-
Notifications
You must be signed in to change notification settings - Fork 37
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
Strongly type ApiVersion and SdkVersion #3753
Conversation
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. |
31ef06e
to
4e6e646
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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
This PR has been shipped in release v2.76.0. |
packageGenerator.apiVersion
topackageGenerator.sdkVersion
.packageGenerator.allApiVersions
topackageGenerator.allSdkVersions
.collections.OrderableSet
as replacement forcodegen.StringSet
which allows for non-string types.ShouldInclude
with the RemovedVersions file which included removed versions in the description.