Strongly type ApiVersion and SdkVersion#3753
Merged
Merged
Conversation
Contributor
Does the PR have any schema changes?Looking good! No breaking changes found. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3753 +/- ##
=======================================
Coverage 56.92% 56.92%
=======================================
Files 74 76 +2
Lines 11841 11877 +36
=======================================
+ Hits 6740 6761 +21
- Misses 4610 4624 +14
- Partials 491 492 +1 ☔ View full report in Codecov by Sentry. |
danielrbradley
commented
Dec 5, 2024
31ef06e to
4e6e646
Compare
thomas11
reviewed
Dec 6, 2024
thomas11
left a comment
Contributor
There was a problem hiding this comment.
Great readability improvement! One comment about potentially passing the wrong kind of version needs to be resolved, the others are "should have".
Make the type aliases into type definitions. Renames: - packageGenerator.apiVersion to packageGenerator.sdkVersion - packageGenerator.allApiVersions to packageGenerator.allSdkVersions Add packageGenerator.apiVersion as pointer to an ApiVersion, if we can convert it. Add OrderableSet as replacement for codegen.StringSet Fix all references. Fix tests where we were using the wrong type of version.
- Clarify existing comment. - Switch TODO to an explanation. - Ensure we always have API version for non-default versions and error if not. - Move version nil check into ShouldInclude.
Fix handling of "-beta" versions when converting back from SDK version to API version.
4e6e646 to
64156d6
Compare
thomas11
approved these changes
Dec 6, 2024
danielrbradley
added a commit
that referenced
this pull request
Dec 6, 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
Contributor
|
This PR has been shipped in release v2.76.0. |
This was referenced Sep 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
packageGenerator.apiVersiontopackageGenerator.sdkVersion.packageGenerator.allApiVersionstopackageGenerator.allSdkVersions.collections.OrderableSetas replacement forcodegen.StringSetwhich allows for non-string types.ShouldIncludewith the RemovedVersions file which included removed versions in the description.