-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[go/sdk] Delegate alias computation to the engine #11935
Conversation
Changelog[uncommitted] (2023-01-25)Bug Fixes
|
fd8b7f5
to
3ad9a40
Compare
e217164
to
59fb438
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.
RE: the question about testing:
Someone with more familiarity with the codebase might have a better answer but besides the integration tests, you may be able to install a fake ResourceMonitorClient, intercept RegisterResource calls, and verify that they contain the right Aliases information.
6fc4d5d
to
4379808
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.
No issues on the implementation end.
Thanks for making all the fixes!
Is there a better way to test this than the ResourceMonitor mock I suggested earlier?
9a22567
to
b5691ab
Compare
bc4b608
to
c3cbeb3
Compare
bors merge |
11935: [go/sdk] Delegate alias computation to the engine r=Zaid-Ajaj a=Zaid-Ajaj # Description This PR removes the use of `collapseAliases` from the go SDK which used to calculate aliases of resources from `ResourceOptions` and their inherited child aliases (a.k.a. alias explosion) and starts using the new alias specification `pulumirpc.Alias` that is handled by the engine in a language-agnostic manner. This PR removes `aliases: []URNOutput` from `resourceState` because we no longer have to keep track of them in `makeResourceState` but instead calculate them in `prepareResourceInputs`. Fixes #11066 Potentially addresses #11697 ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [ ] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Service, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> Co-authored-by: Zaid Ajaj <zaid.naom@gmail.com>
Build failed: |
bors retry |
Build succeeded: |
11981: Test retype remote component and child using aliases r=justinvp a=Zaid-Ajaj # Description Reproduces #11697 and expected to fail right now. Will rebase on #11935 once merged Fixes #11697 (issue) ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [ ] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [ ] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Service, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> Co-authored-by: Zaid Ajaj <zaid.naom@gmail.com>
Description
This PR removes the use of
collapseAliases
from the go SDK which used to calculate aliases of resources fromResourceOptions
and their inherited child aliases (a.k.a. alias explosion) and starts using the new alias specificationpulumirpc.Alias
that is handled by the engine in a language-agnostic manner.This PR removes
aliases: []URNOutput
fromresourceState
because we no longer have to keep track of them inmakeResourceState
but instead calculate them inprepareResourceInputs
.Fixes #11066
Potentially addresses #11697
Checklist
make changelog
and committed thechangelog/pending/<file>
documenting my change