Visitar URL original
Retry all errors by Frassle · Pull Request #23347 · pulumi/pulumi · GitHub
Skip to content

Retry all errors - #23347

Merged
Frassle merged 3 commits into
masterfrom
fraser/errorhooks
May 27, 2026
Merged

Frassle merged 3 commits into
masterfrom
fraser/errorhooks

Conversation

@Frassle

@Frassle Frassle commented May 26, 2026 •

Copy link
Copy Markdown
Member

Fixes #23344

We were limiting errors for retry to only those that were StatusPartialFailure errors. But there's no reason to limit users to just seeing those errors, we can forward every error to the user and let them decide if they want to retry it or not.

@Frassle
Frassle marked this pull request as ready for review May 27, 2026 04:05
@Frassle
Frassle requested a review from a team as a code owner May 27, 2026 04:05
@Frassle
Frassle added this pull request to the merge queue May 27, 2026
Merged via the queue into master with commit 7b59639 May 27, 2026
232 of 234 checks passed
@Frassle
Frassle deleted the fraser/errorhooks branch May 27, 2026 11:12
i-am-tom pushed a commit that referenced this pull request May 27, 2026
Fixes #23344

We were limiting errors for retry to only those that were
`StatusPartialFailure` errors. But there's no reason to limit users to
just seeing those errors, we can forward every error to the user and let
_them_ decide if they want to retry it or not.
@pulumi-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped in release v3.244.0.

pull Bot pushed a commit to makesoftwaresafe/pulumi that referenced this pull request May 29, 2026
## Summary

- `mergeOptions` in the Node.js SDK handled the `hooks` field specially
but only merged the six lifecycle hook types (`beforeCreate`,
`afterCreate`, `beforeUpdate`, `afterUpdate`, `beforeDelete`,
`afterDelete`) — `onError` was missing from the list
- Every generated provider SDK resource (e.g. `aws.s3.Bucket`) calls
`pulumi.mergeOptions(resourceOptsDefaults(), opts)` in its constructor,
so `onError` hooks passed by users were silently dropped before
`RegisterResource` was sent to the engine
- The engine never received the `onError` hooks for the resource and
therefore never invoked them on failure

Fixes pulumi#23344 (the engine-side fix in pulumi#23347 was correct but this Node.js
SDK bug meant hooks never reached the engine).

## Test plan

- [ ] Added three unit tests to `sdk/nodejs/tests/options.spec.ts`
covering: preserving `onError` hooks from opts1, preserving from opts2,
and merging from both
- [ ] Run `npx mocha tests/options.spec.ts` in `sdk/nodejs` — all 45
tests pass
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.

onError hook not firing

3 participants