pulumi-azure-native icon indicating copy to clipboard operation
pulumi-azure-native copied to clipboard

Remove pulumictl and java-gen

Open danielrbradley opened this issue 11 months ago • 9 comments

Stacked on #3775

  • Use java plugin bundled with the Pulumi CLI via pulumi package gen-sdk command.
  • Insert the real version into the generated 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 https://github.com/pulumi/pulumi-java/pull/1501 being released as part of the Pulumi CLI which is now complete in 3.143.0

danielrbradley avatar Dec 11 '24 10:12 danielrbradley

Does the PR have any schema changes?

Looking good! No breaking changes found. No new resources/functions.

github-actions[bot] avatar Dec 11 '24 13:12 github-actions[bot]

Not super sure. Wonder which version of the javagen code the new invocation is calling, though sounds like that code is present on latest.

t0yv0 avatar Dec 11 '24 14:12 t0yv0

Looks like pu/pu is importing github.com/pulumi/pulumi-java/pkg v0.18.0

danielrbradley avatar Dec 11 '24 15:12 danielrbradley

This should be shippable once the pulumi-java then pulumi (with the upgraded dependency) are released.

danielrbradley avatar Dec 11 '24 17:12 danielrbradley

This is still failing due to:

  • https://github.com/pulumi/pulumi-java/issues/1508

danielrbradley avatar Dec 12 '24 11:12 danielrbradley

This is still failing due to:

@danielrbradley the issue was fixed and shipped p-java v1.0.0.

thomas11 avatar Jan 14 '25 13:01 thomas11

Yup, hoping to get time to finish this up soon

danielrbradley avatar Jan 14 '25 14:01 danielrbradley

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 56.97%. Comparing base (54a828d) to head (516e33a).

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              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 14 '25 15:01 codecov[bot]

@thomas11, @t0yv0 & @lunaris I think this is very close to working via the plugin now with a couple of parts to confirm:

  1. It appears we need to set the buildFiles and gradleNexusPublishPluginVersion options in the schema java lanuage config - can't see any other way to enable this. Perhaps we could just set this as the default now? Or alternatively have a simpler single field to specify the build setup to also help with if we move to the maven plugin?
  2. The dependency on com.pulumi:pulumi in the build.gradle is generated as 0.19.0 whereas the gen binary generated it at 1.0.0. Does something need bumping to move the plugin version to use 1.0.0 or is this correct?

danielrbradley avatar Jan 14 '25 16:01 danielrbradley