don't register resource outputs for skipped creates#21957
Merged
Conversation
Frassle
approved these changes
Feb 26, 2026
| registerComponent = true | ||
|
|
||
| _, err = lt.TestOp(Update).RunStep(p.GetProject(), p.GetTarget(t, nil), opts, false, p.BackendClient, nil, "1") | ||
| require.NoError(t, err) |
Member
There was a problem hiding this comment.
Worth asserting that the component isn't in the snapshot?
Collaborator
Author
There was a problem hiding this comment.
Yeah, I think that's a good idea. Done ✔️
fbf3f83 to
bc569b9
Compare
Merged
Contributor
|
/rebase |
Sometimes (in particular for new resources in the program that are untargeted, or when using `--run-program`), we generate "skipped creates", which are the engines way of pretending we create a resource, but leaving it out of the snapshot. However for component resources, at the point of generating that skipped create, we've already started running `Construct`, which will subsequently call `registerOutputs`, as we require all component resources to do. This becomes a problem in particular with journaling, as there, when registering outputs, we try to replace a resource in the snapshot with the new updated resource with the new outputs. However, since we have a skipped create, the resource is never registered in the snapshot in the first place, and we panic when trying to find the resource to replace. Fix this by exiting early from registerResourceOutputs if the associated resource registration was a skipped create. This fixes the panic.
b4bc400 to
1d5b349
Compare
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Feb 26, 2026
#21953 is in the merge queue, freeze after that lands. Also waiting for #21957 to merge ## (2026-02-26) ### Features - [backend/diy] Add zstd compression option for DIY backend state files [#21877](#21877) ### Bug Fixes - [pkg] Correct the schema for "pulumi:pulumi:StackReference" [#21895](#21895) - [programgen/nodejs] Correct the semantics of singleOrNone in generated files [#21947](#21947) - [sdk/python] Fix `StepEventMetadata.from_json` reading `detailed_diff` (snake_case) instead of `detailedDiff` (camelCase), and `PolicyEvent.from_json` reading `resource_urn` instead of `resourceUrn`, causing both fields to always be `None` [#21714](#21714) - [sdk/python] Convert integer component inputs to `int` [#21944](#21944) - [sdk/python] Fix crash in forked processes using automation API [#21937](#21937) ### Miscellaneous - [sdk] Update java, dotnet & yaml [#21961](#21961) - [sdk/python] Improve the performance of `contains_unknowns` for large objects [#21893](#21893)
julienp
added a commit
that referenced
this pull request
Feb 26, 2026
- [engine] Automatically make invoke outputs secret when there is a secret input, and the invoke provider does not support secrets [#21959](#21959) - [backend/diy] Add zstd compression option for DIY backend state files [#21877](#21877) - [cli/package] Support source-based packages in `pulumi schema check`, not just schema files [#21897](#21897) - [engine] Fix panic when a new component resource in the program is not targeted [#21957](#21957) - [cli/state] `state move` now correctly handles reparenting of resources [#21953](#21953) - [pkg] Correct the schema for "pulumi:pulumi:StackReference" [#21895](#21895) - [programgen/nodejs] Correct the semantics of singleOrNone in generated files [#21947](#21947) - [sdk/python] Fix `StepEventMetadata.from_json` reading `detailed_diff` (snake_case) instead of `detailedDiff` (camelCase), and `PolicyEvent.from_json` reading `resource_urn` instead of `resourceUrn`, causing both fields to always be `None` [#21714](#21714) - [sdk/python] Convert integer component inputs to `int` [#21944](#21944) - [sdk/python] Fix crash in forked processes using automation API [#21937](#21937) - [sdk] Update java, dotnet & yaml [#21961](#21961) - [sdk/python] Improve the performance of `contains_unknowns` for large objects [#21893](#21893)
Contributor
|
This PR has been shipped in release v3.224.0. |
Contributor
|
This PR has been shipped in release v3.225.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sometimes (in particular for new resources in the program that are untargeted, or when using
--run-program), we generate "skipped creates", which are the engines way of pretending we create a resource, but leaving it out of the snapshot.However for component resources, at the point of generating that skipped create, we've already started running
Construct, which will subsequently callregisterOutputs, as we require all component resources to do.This becomes a problem in particular with journaling, as there, when registering outputs, we try to replace a resource in the snapshot with the new updated resource with the new outputs. However, since we have a skipped create, the resource is never registered in the snapshot in the first place, and we panic when trying to find the resource to replace.
Fix this by exiting early from registerResourceOutputs if the associated resource registration was a skipped create. This fixes the panic.
Fixes #21463
Closes #21490