-
Notifications
You must be signed in to change notification settings - Fork 116
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
Fix various typegen issues #635
Conversation
34eac1e
to
be6be6d
Compare
Oops, forgot Python. Will come back for it soon... |
.metadata.namespace
to be specified with core.v1.Namespace
sdk/nodejs/admissionregistration/v1beta1/MutatingWebhookConfiguration.ts
Outdated
Show resolved
Hide resolved
// In Kubernetes, `.metadata.namespace` must be a `string`. In Pulumi, we allow users to | ||
// pass in `string | core.v1.Namespace`. Thus, if the user has provided a | ||
// `core.v1.Namespace`, we convert it to a `string` representing that namespace's name. | ||
args && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this code just won't work at all:
- The result of the
apply
is never awaited - Mutating the inputs is probably not a good idea (what if they are shared amongst multiple resources?) if it works at all (and it may not, cc @lukehoban)
- Because
core.v1.Namespace.metadata.name
is itself an output, we may lose dependency information if it is injected inside anapply
(not 100% sure here, but this definitely happens when an output is resolved to another output)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should work because the name
is guaranteed to be present after the Check
, but you're right that this is not acceptable to ship. Let's fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've cleaned this up a bit -- I'm still on the fence about whether we should move unpackNamespace
out into a utility function in some other file. I'm less concerned than normal because it's all code-gen'd, but if there was a good place to put it I'd be open to moving it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the namespace-related code is broken; I left a comment with details.
8644bbf
to
236068c
Compare
@hausdorff Are we going to finish this off and land it? There also appear to be a couple unrelated issues being solved here - and the more critical ones may be less contentious so if we need to land those separately we should do so. |
@hausdorff What's the status of this? |
3f1b53b
to
69c0fb1
Compare
69c0fb1
to
850bd27
Compare
sdk/python/pulumi_kubernetes/admissionregistration/v1beta1/MutatingWebhookConfiguration.py
Show resolved
Hide resolved
850bd27
to
59cf911
Compare
73db48f
to
c72c3fc
Compare
vscode (apparently) intellisense requires direct import of classes in the __init__.py files for each apiversion. We implement this as such.
01e6b1a
to
3c6fa53
Compare
Removed the namespace parts that were concerning
Fixes #444.
Fixes #728.