-
Notifications
You must be signed in to change notification settings - Fork 21
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
Apply default dependencies when called from Pulumi CLI #1501
Conversation
The `pulumi package gen-sdk` command calls `GeneratePackage` directly, so we need to apply the defaults at that layer rather than in the pulumi-java-gen specific code.
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.
Looks good -- thanks for raising!
- Need to assign back to a new variable. - Assign before turning into a pointer. - Update changelog
From local testing I can confirm this fixes two of the three missing dependencies in pulumi/pulumi-azure-native#3776 However, the third missing dependency is actually the Pulumi Java SDK itself. This is added when calling the pulumi-java-gen binary directly because the build process bakes in the version number. However, AFAIK there's no way for a Go package to fetch its own version automatically. Question for @lunaris and @Frassle: do we just hard code the self-reference and manually bump it as required or should we do something clever like letting the pulumi/cmd set the verison? |
Without the pulumi java dependency the SDK is not buildable. We can't infer this at build time because go modules don't have a 'build phase' and can't lookup their own version.
We add it as a linker flag when building. https://github.com/pulumi/pulumi-java/blob/main/.goreleaser.yml#L22 |
That's fine when building the binary, but for |
Also unblocks pulumi/pulumi-kubernetes#3151 |
Oh right yeh. We plan on moving this code to run over grpc so it will actually be in the build pulumi-language-java binary. Probably easier to just wait for that change. I imagine we're close to switching over, I think the java binary does now support these rpc calls. |
Ok, will stick with the hard coded default for now but can override that when we do the grpc plugin change. |
New Pulumi CLI version includes bump to Java which includes the fix for the missing dependencies: pulumi/pulumi-java#1501
The
pulumi package gen-sdk
command callsGeneratePackage
directly, so we need to apply the defaults at that layer rather than in the pulumi-java-gen specific code.Fixes #1500