-
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
[v3] Detect resource path conflicts and disambiguate #3817
base: master
Are you sure you want to change the base?
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 #3817 +/- ##
=========================================
Coverage ? 56.74%
=========================================
Files ? 79
Lines ? 12351
Branches ? 0
=========================================
Hits ? 7009
Misses ? 4814
Partials ? 528 ☔ View full report in Codecov by Sentry. |
317863e
to
284e727
Compare
284e727
to
a5fa911
Compare
a5fa911
to
ea458e3
Compare
ea458e3
to
d3af70c
Compare
656fb9b
to
7a1874c
Compare
canonPath := paths.NormalizePath(resource.Path) | ||
|
||
typeName := resource.typeName | ||
if g.majorVersion > 3 { |
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.
>=
!!
Summary from conversation: add typed strings for |
7a1874c
to
2e1b64a
Compare
5ca52d9
to
0a241ea
Compare
0a241ea
to
16add24
Compare
This PR is based on #3815 and contains its commits.
Resolves #2495
Resolves #2753
Previously, schema and metadata generation of this provider assumed that a type token like
azure-native:netapp:Pool
uniquely identifies a resource. In the Azure spec, that's not always the case across API versions.For instance, as shown by #2753, resources such as
PrivateEndpointConnection
can point to the /servers/ API in one API version but to the newer /flexibleServers/ API, which is a completely different product underneath, in another version.This PR does two things:
PrivateEndpointConnection
, we rename the resource toSingleServerPrivateEndpointConnection
when it points to the /servers/ API.Any change to the generated schema is gated behind a "version >= 3" check to avoid breaking changes in v2.