Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression: pulumi no longer supports v1/List #1156

Closed
Place1 opened this issue Jun 11, 2020 · 1 comment · Fixed by #1157
Closed

regression: pulumi no longer supports v1/List #1156

Place1 opened this issue Jun 11, 2020 · 1 comment · Fixed by #1157
Assignees

Comments

@Place1
Copy link

Place1 commented Jun 11, 2020

I've been using the following helm chart transformation for removing helm hooks:

function removeHelmTests() {
  return (obj: any) => {
    if (!obj) {
      return;
    }
    if (obj.metadata && obj.metadata.annotations && obj.metadata.annotations['helm.sh/hook']) {
      // transforms in nodejs expects you to mutate input object, not return a new one.
      // https://github.com/pulumi/pulumi-kubernetes/blob/4b01b5114df3045cecefd2ff3e2f2ed64430e3dd/sdk/nodejs/yaml/yaml.ts#L2214
      for (const key in obj) {
        delete obj[key];
      }
      Object.assign(obj, {
        kind: 'List',
        apiVersion: 'v1',
        metadata: {},
        items: [],
      });
      return null;
    }
    return;
  };
}

This used to work when i first wrote it because pulumi handled the v1/List type: see the code

But now this special handling for "list" is gone: see the code

I think this is a regression.

@leezen leezen assigned leezen and lblackstone and unassigned leezen Jun 11, 2020
@lblackstone
Copy link
Member

Sorry about that. I'll get that fixed shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants