Skip to content
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

Preserve previous default versions in v3 #3748

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

danielrbradley
Copy link
Member

@danielrbradley danielrbradley commented Dec 4, 2024

Fixes #3424

Before considering the resources marked for removal, if the resource version was in the previous default version, ensure we include it.

Only fix this for v3 onwards so we don't introduce schema changes now.

Bonus:

  • Fix handling of "-beta" versions when converting back from SDK version to API version.

Stacked on top of #3753

@danielrbradley danielrbradley requested review from thomas11, EronWright and a team December 4, 2024 21:50
@danielrbradley danielrbradley self-assigned this Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Does the PR have any schema changes?

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

Copy link
Contributor

@thomas11 thomas11 left a comment

Choose a reason for hiding this comment

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

I wouldn't expect SDK changes in this PR. I guess the change affects the v1-v2 comparison, but I don't think we should change v2 retroactively.

provider/pkg/gen/schema.go Outdated Show resolved Hide resolved
@thomas11 thomas11 changed the title Preseve previous default versions Preserve previous default versions Dec 5, 2024
@danielrbradley danielrbradley force-pushed the preseve-previous-default-versions branch from 4fe892f to a02ce56 Compare December 6, 2024 09:41
@danielrbradley danielrbradley changed the base branch from master to typed-versions December 6, 2024 09:41
@danielrbradley danielrbradley changed the title Preserve previous default versions Preserve previous default versions in v3 Dec 6, 2024
provider/pkg/versioning/gen.go Outdated Show resolved Hide resolved
@danielrbradley danielrbradley force-pushed the preseve-previous-default-versions branch from a02ce56 to c80f4e6 Compare December 6, 2024 11:30
Base automatically changed from typed-versions to master December 6, 2024 12:39
Before considering the resources marked for removal, if the resource version was in the previous default version, ensure we include it.

Only enable this for the v3 release because it will add a lot more explicit versions.
- Make DefaultVersionLock a type definition instead of an alias.
- Add IsAtVersion method.
- Refactor usages in ShouldInclude.
@danielrbradley danielrbradley force-pushed the preseve-previous-default-versions branch from c80f4e6 to ab1ed99 Compare December 6, 2024 12:40
@danielrbradley danielrbradley enabled auto-merge (squash) December 6, 2024 12:40
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

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

Project coverage is 56.88%. Comparing base (04edaa3) to head (ab1ed99).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
provider/pkg/openapi/discover.go 0.00% 7 Missing ⚠️
provider/pkg/versioning/gen.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3748      +/-   ##
==========================================
- Coverage   56.92%   56.88%   -0.04%     
==========================================
  Files          76       76              
  Lines       11877    11885       +8     
==========================================
  Hits         6761     6761              
- Misses       4624     4632       +8     
  Partials      492      492              

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

@danielrbradley danielrbradley merged commit a8e5e1c into master Dec 6, 2024
23 checks passed
@danielrbradley danielrbradley deleted the preseve-previous-default-versions branch December 6, 2024 13:11
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v2.76.0.

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.

When moving to a new major version, preserve all default API versions of the previous one
3 participants