Skip to content

Generate a default API versions only schema and use it for sdkgen in version 3+#4016

Merged
thomas11 merged 2 commits into
masterfrom
tkappler/v3-default-only
Mar 13, 2025
Merged

Generate a default API versions only schema and use it for sdkgen in version 3+#4016
thomas11 merged 2 commits into
masterfrom
tkappler/v3-default-only

Conversation

@thomas11

@thomas11 thomas11 commented Mar 11, 2025

Copy link
Copy Markdown
Contributor

For v3 of the provider, we want to generate SDKs only for the default API versions. However, to enable parameterization to generate SDKs for any API version at runtime, we need the full schema and metadata. This PR adds a build step of generating a default-versions-only schema that's then used to generate the SDKs. The full schema is embedded into the provider as before.

A branch with this PR but regenerated for PROVIDER_VERSION=3.0.0 is here.

Resolves #3422

@github-actions

Copy link
Copy Markdown
Contributor

Does the PR have any schema changes?

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

@codecov

codecov Bot commented Mar 11, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.

Project coverage is 57.67%. Comparing base (0436558) to head (57d8683).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
provider/pkg/gen/schema.go 0.00% 14 Missing and 1 partial ⚠️
provider/cmd/pulumi-gen-azure-native/main.go 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4016      +/-   ##
==========================================
- Coverage   57.76%   57.67%   -0.10%     
==========================================
  Files          82       82              
  Lines       13144    13156      +12     
==========================================
- Hits         7593     7588       -5     
- Misses       4974     4991      +17     
  Partials      577      577              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@EronWright EronWright left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@thomas11 thomas11 force-pushed the tkappler/v3-default-only branch from 00b632f to 57d8683 Compare March 13, 2025 06:27
@thomas11 thomas11 enabled auto-merge (squash) March 13, 2025 06:28
@thomas11 thomas11 merged commit db23b8b into master Mar 13, 2025
@thomas11 thomas11 deleted the tkappler/v3-default-only branch March 13, 2025 07:01
thomas11 added a commit that referenced this pull request Mar 18, 2025
This is a follow-up to #4016 where I had forgotten that Go SDK
generation works differently than the other languages. Fortunately, the
code already accepts the required arguments, we just need to pass them.

This PR has no effect on the SDK in v2.x, only in v3.x.

I wonder if we should remove the "default" schema location altogether
and just make the argument mandatory.
@pulumi-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped in release v2.89.2.

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 this pull request may close these issues.

V3: shrink package size

4 participants