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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save component resources as parents #15846

Merged
merged 1 commit into from
Apr 15, 2024
Merged

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented Apr 2, 2024

Description

Fixes #15843.

This tracks parent information separate from Goal information (as that was only generated and saved for custom, not component, resources).

We also need to keep track of the transform list between the first RegisterResource starting a remote component construction and the remote component actually registering itself. This means we save the transform list correctly once the component is registered inside the remote process allowing other resource registrations in the remote process to see that saved transform list.
If we just wait till the Construct call is done then none of the inner children pick up the transform list.

Checklist

  • I have run make tidy to update any new dependencies
  • I have run make lint to verify my code passes the lint check
    • I have formatted my code using gofumpt
  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Apr 2, 2024

Changelog

[uncommitted] (2024-04-08)

Bug Fixes

  • [engine] Resource transforms on component resources now apply to children correctly
    #15846

@Frassle Frassle force-pushed the fraser/componentTransforms branch from 96c74f8 to 8a02737 Compare April 2, 2024 11:35
@Frassle Frassle force-pushed the fraser/componentTransforms branch from 8a02737 to 9528448 Compare April 8, 2024 06:45
@Frassle Frassle marked this pull request as ready for review April 8, 2024 08:37
@Frassle Frassle requested a review from a team as a code owner April 8, 2024 08:37
Comment on lines +1521 to +1523
if pending, ok := rm.pendingTransforms[pendingKey]; ok {
transforms = pending
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the program specified transforms for the remote component and then the implementation of the remote component (inside Construct) also adds more transforms to its request?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we ignore the transforms set inside the component. We could append them to the pending list, but need to be careful about duplication and ordering.

@Frassle Frassle added this pull request to the merge queue Apr 15, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Apr 15, 2024
@Frassle Frassle added this pull request to the merge queue Apr 15, 2024
Merged via the queue into master with commit ce04d43 Apr 15, 2024
49 checks passed
@Frassle Frassle deleted the fraser/componentTransforms branch April 15, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xTransforms does not work to set custom timeouts for awsx.ecs.FargateService
4 participants