-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fix generated Go import paths #3335
Conversation
- Set `importPathPattern` so convert can create module names accurately. - Fix `golangImportAliases` so they don't have `v2` in twice.
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.
- "github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v2"
+ azurestackhci "github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v2"
Why is this an improvement? Using the first form, Go will handle the /v2
and you can just use azurestackhci.Foo
.
I think this change is inconsequential, but adding the metadata to the schema allows pulumi convert to function correctly. @Zaid-Ajaj is that correct? What this change does show is that the aliases do now match up to what we actually contain in the Go code. |
Does the PR have any schema changes?Looking good! No breaking changes found. |
That's right, I think we now get the an alias because it actually hit one of keys in |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3335 +/- ##
==========================================
- Coverage 56.84% 56.82% -0.02%
==========================================
Files 66 66
Lines 8076 8082 +6
==========================================
+ Hits 4591 4593 +2
- Misses 3052 3054 +2
- Partials 433 435 +2 ☔ View full report in Codecov by Sentry. |
Fixes #3308
importPathPattern
so convert can create module names accurately.golangImportAliases
so they don't havev2
in twice.This updates the paths in all go examples. Exploded schema diff:
![image](https://private-user-images.githubusercontent.com/331676/337295497-3b661d57-bff1-4253-b260-88d27a638692.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwODMxNTcsIm5iZiI6MTczOTA4Mjg1NywicGF0aCI6Ii8zMzE2NzYvMzM3Mjk1NDk3LTNiNjYxZDU3LWJmZjEtNDI1My1iMjYwLTg4ZDI3YTYzODY5Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOVQwNjM0MTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hNzE4ZmZmNjY2ZTMzNmEyOWU4MzUxODM5NTcwMzU4ZGU0YmQ5NjJhNzFhNWJlZmRiYzBhY2FjNTZmZjVjMTViJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.HAi7zhgpuLmWMaCvmbr3RpyO8rbT5p1wgWV1kMSo3RE)
Each file has the following example change:
This also related to #2990 though appears it doesn't solve all formatting yet.