-
Notifications
You must be signed in to change notification settings - Fork 38
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
Remove pulumictl and java-gen #3776
base: master
Are you sure you want to change the base?
Conversation
df9caed
to
65cfd2e
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
Not super sure. Wonder which version of the javagen code the new invocation is calling, though sounds like that code is present on latest. |
Looks like pu/pu is importing github.com/pulumi/pulumi-java/pkg |
This should be shippable once the pulumi-java then pulumi (with the upgraded dependency) are released. |
65cfd2e
to
33b3d33
Compare
This is still failing due to: |
Presently, the majority of Java code generation is driven by the `pulumi-java-gen` binary, since Java usage began before we had time to implement the `Generate*` family of language host gRPC methods. Recently, these gRPC methods were implemented, to support (among other things) conformance testing. Unfortunately, while both routes end in `pkg/codegen/java`'s `Generate*` functions, each had accumulated its own special "setup logic" ahead of the call into `pkg/codegen`. This commit attempts to sort this out, pushing all that logic into `pkg/codegen` so that both routes behave identically. As a result of this, we should be able to deprecate `pulumi-java-gen` more safely when the time comes, remove direct build-time dependencies on `pulumi-java` from `pulumi/pulumi` and fix some issues that have arisen as a result of the historic differences, such as #1404 (which looks like it may have already been fixed, but this should cement it), and the Java side of #1508. Alongside new unit tests and existing conformance tests, this changeset has been manually tested using `pulumi-azure-native` and changes akin to those in pulumi/pulumi-azure-native#3776 (using a locally modified `pulumi package gen-sdk` that can be mainstreamed when these changes have been merged and released). Closes #1404 Part of #1508
@danielrbradley the issue was fixed and shipped p-java v1.0.0. |
Yup, hoping to get time to finish this up soon |
Update java language settings as we can't pass the `-build gradle-nexus` option via gen-sdk. This is derived from https://github.com/pulumi/pulumi-java/blob/cfe8b2ad051d4767d04340542bd1ad28097095b2/pkg/cmd/pulumi-java-gen/command.go#L174-L178 where the flag sets BuildFiles and GradleNexusPublishPluginVersion in the PackageInfo. Set version in generation Match behaviour of other SDKs
- We only use the `pulumi` CLI for generation now. - Remove upgrade targets too.
b059fcc
to
de71487
Compare
We now embed the version at the point of generating the code.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3776 +/- ##
==========================================
+ Coverage 56.96% 56.97% +0.01%
==========================================
Files 79 79
Lines 12407 12410 +3
==========================================
+ Hits 7068 7071 +3
Misses 4809 4809
Partials 530 530 ☔ View full report in Codecov by Sentry. |
@thomas11, @t0yv0 & @lunaris I think this is very close to working via the plugin now with a couple of parts to confirm:
|
Stacked on #3775
pulumi package gen-sdk
command.build.gradle
to match other SDKs.Comparing all non-committed files locally, the only difference is the "generated by" header comment changing from "java-gen" to "pulumi".
It appears that the only way to configure the java gen to include the gradle setup is by adding two fields to the java lanaguge config in the schema.
Depended on pulumi/pulumi-java#1501 being released as part of the Pulumi CLI which is now complete in 3.143.0