Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sdks/node] Delegate alias computation to the engine #11062

Closed
Tracked by #11940
kpitzen opened this issue Oct 18, 2022 · 0 comments 路 Fixed by #11206
Closed
Tracked by #11940

[sdks/node] Delegate alias computation to the engine #11062

kpitzen opened this issue Oct 18, 2022 · 0 comments 路 Fixed by #11206
Assignees
Labels
area/sdks Pulumi language SDKs kind/enhancement Improvements or new features language/javascript resolution/fixed This issue was fixed
Milestone

Comments

@kpitzen
Copy link
Contributor

kpitzen commented Oct 18, 2022

Hello!

  • Vote on this issue by adding a 馃憤 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

Currently, we pre-compute all possible alias combinations in the node sdk here. When each resource in an inheritance chain has many aliases, this quickly grows multiplicatively. Instead, we should simply compute the aliases for the resource we're registering, and allow the engine to do this computation for us. Additionally, we should ensure we send the structured version of aliases across rather than just raw URNs.

Affected area/feature

Node SDK

@kpitzen kpitzen added area/sdks Pulumi language SDKs kind/enhancement Improvements or new features language/javascript labels Oct 18, 2022
@kpitzen kpitzen changed the title [sdk/node] Delegate alias computation to the engine [sdks/node] Delegate alias computation to the engine Oct 18, 2022
@kpitzen kpitzen self-assigned this Oct 18, 2022
@kpitzen kpitzen added this to the 0.80 milestone Oct 25, 2022
@kpitzen kpitzen modified the milestones: 0.80, 0.81 Nov 14, 2022
@mikhailshilkov mikhailshilkov modified the milestones: 0.81, 0.82 Dec 6, 2022
bors bot added a commit that referenced this issue Dec 15, 2022
11206: feat(sdk/nodejs): delegates alias computation to the engine r=kpitzen a=kpitzen

<!--- 
Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation.
-->

# Description

This moves the alias computation from the node SDK to the engine (which now does these computations for us as of #10819 ).  This dramatically improves performance when resources with many aliases are parented to one another.

<!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. -->

Fixes #11062 

## Checklist

<!--- Please provide details if the checkbox below is to be left unchecked. -->
- [x] 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: Kyle Pitzen <kyle.pitzen@gmail.com>
@bors bors bot closed this as completed in 24f0ae3 Dec 16, 2022
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sdks Pulumi language SDKs kind/enhancement Improvements or new features language/javascript resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants