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

Report snapshot write errors as actual errors #16090

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

lunaris
Copy link
Contributor

@lunaris lunaris commented Apr 30, 2024

When we finish an operation and close the snapshot manager, the snapshot manager may perform a final write if there are unflushed changes (e.g. refresh changes whose writes were elided at the time). Things may go wrong at this point -- if something is wrong with the snapshot, the integrity check following this write could fail; if a write error occurs, pieces of the snapshot may be missing. In these cases, we really don't want to swallow the error or report it as "just" a diagnostic, because it's a real problem that will almost certainly rear its head on the next Pulumi invocation when we attempt (and fail) to read the snapshot (or worse, operate with an incomplete one). This commit changes the existing flow to report all snapshot close errors as bonafide failures, even if the actual operation has succeeded and been applied.

@lunaris lunaris requested a review from a team as a code owner April 30, 2024 14:49
@pulumi-bot
Copy link
Contributor

Changelog

[uncommitted] (2024-04-30)

Bug Fixes

  • [backend/{diy,service}] Promote snapshot closure errors from diagnostics to actual errors
    #16090

When we finish an operation and close the snapshot manager, the snapshot
manager may perform a final write if there are unflushed changes (e.g.
refresh changes whose writes were elided at the time). Things may go
wrong at this point -- if something is wrong with the snapshot, the
integrity check following this write could fail; if a write error
occurs, pieces of the snapshot may be missing. In these cases, we really
don't want to swallow the error or report it as "just" a diagnostic,
because it's a real problem that will almost certainly rear its head on
the next Pulumi invocation when we attempt (and fail) to read the
snapshot (or worse, operate with an incomplete one). This commit changes
the existing flow to report all snapshot close errors as bonafide
failures, even if the actual operation has succeeded and been applied.
@lunaris lunaris force-pushed the wjones/16052-snapshot-errors branch from 3aa6e9e to 454327c Compare April 30, 2024 16:36
@lunaris lunaris added this pull request to the merge queue Apr 30, 2024
Merged via the queue into master with commit a2b2276 Apr 30, 2024
49 checks passed
@lunaris lunaris deleted the wjones/16052-snapshot-errors branch April 30, 2024 18:57
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.

None yet

4 participants