Skip to content

Conversation

justinvp
Copy link
Member

This PR updates dependencies to pulumi v3.178.0 and specifies RefreshBeforeUpdate on partial failures (which is now supported in v3.178.0). Previously, it was only possible to indicate RefreshBeforeUpdate on successful provider operations.

With this, if a Module CustomResource partially fails during Create (e.g. one of it's children has failed), as part of reporting a partial failure using ErrorResourceInitFailed, it can now indicate that it should be refreshed by default. This way, on the next pulumi up, the Module resource will be refreshed as intended, giving the Module resource an opportunity to "retry" for any of the failed children.

This will make #420 work as intended on subsequent pulumi ups.

Part of #342
Reference: pulumi/pulumi#19909

justinvp added 2 commits June 20, 2025 08:45
Update Pulumi to v3.178.0.
Pulumi v3.178.0 now supports indicating a resource should be refreshed by default from partial failures. Previously, it was only possible to indicate this on successful provider operations.

With this, if a Module CustomResource partially fails during Create (e.g. one of it's children has failed), it can report a partial failure using `ErrorResourceInitFailed` and now indicate that it should be refreshed before being updated. This way, on the next `pulumi up`, the Module resource will be refreshed before `Update` as intended, giving the Module resource an opportunity to "retry" for any of the failed children.
Id: moduleStateResourceID,
Properties: props,
Reasons: reasons,
RefreshBeforeUpdate: true,
Copy link
Member Author

Choose a reason for hiding this comment

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

Setting RefreshBeforeUpdate for the partial failure case, like what we do for the success case for Create, Read, and Update, e.g.:

return &pulumirpc.CreateResponse{
Id: moduleStateResourceID,
Properties: props,
RefreshBeforeUpdate: true,
}, nil

@justinvp justinvp requested review from Zaid-Ajaj and mjeffryes June 20, 2025 17:28
@justinvp justinvp merged commit 8279c90 into main Jun 20, 2025
18 checks passed
mjeffryes pushed a commit that referenced this pull request Jun 20, 2025
This PR updates dependencies to pulumi v3.178.0 and specifies RefreshBeforeUpdate on partial failures (which is now supported in v3.178.0). Previously, it was only possible to indicate RefreshBeforeUpdate on successful provider operations.

With this, if a Module CustomResource partially fails during Create (e.g. one of it's children has failed), as part of reporting a partial failure using `ErrorResourceInitFailed`, it can now indicate that it should be refreshed by default. This way, on the next `pulumi up`, the Module resource will be refreshed as intended, giving the Module resource an opportunity to "retry" for any of the failed children.
@pulumi-bot
Copy link
Contributor

This PR has been shipped in release v0.1.7.

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.

3 participants