Repository navigation
fix(gateway): preserve web release errors when cleanup fails - #1499
Merged
Merged
Conversation
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.
Follow-up to #1498 and #1493.
When publication and staging cleanup both failed, the cleanup exception escaped from
finallyand hid the filesystem error that prevented startup. The gateway now returns the publication error and logs the cleanup failure with the staging path. Cleanup starts only after this process creates its staging directory.The regression test blocks the real directory rename and injects a cleanup failure scoped to that extraction. It failed on the merged revision with the cleanup error and passes with the fix.
Verification
check:tmp. No temp directories were left behind.EPERMand a persistentEPERMcombined with cleanupEBUSY. Publication succeeded on attempt two for the transient error. Both persistent cases returned the error from the seventh rename.