Repository navigation
unpack: don't drop topHalf errors in parallel mode - #13902
Merged
Merged
Conversation
mxpv
force-pushed
the
unpack-join-toperr
branch
from
August 3, 2026 21:38
37a7fed to
7353be0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an error-handling bug in Unpacker.unpack() where a failure during the “top half” (prepare) of a layer in parallel mode could cause the launch loop to stop but the error to be lost, allowing unpack() to incorrectly return success (and label the image with a chainID that was never fully created). Also closes a tracing span that could leak on this path.
Changes:
- Preserve and return the first “topHalf” error encountered in parallel mode after draining already-queued layers.
- Ensure the per-layer tracing span is ended when
topHalffails. - Add a regression test covering parallel-mode prepare failure behavior while still committing already-queued staged layers.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| core/unpack/unpacker.go | Retains topHalf error in parallel mode, returns it after draining, and ends the tracing span on failure. |
| core/unpack/unpacker_test.go | Adds a test snapshotter that fails Prepare at a chosen index and a regression test verifying the error is returned and earlier layers still commit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
When a layer fails to prepare during parallel unpack we break out of the launch loop but never return the error, so unpack() can report success and label the image with a chainID that was never created. Keep the error and return it once the already queued layers have been drained, so those still commit as they would in sequential mode. Also end the layer's tracing span, which leaked on this path. Signed-off-by: Maksym Pavlenko <[email protected]>
mxpv
force-pushed
the
unpack-join-toperr
branch
from
August 5, 2026 16:44
7353be0 to
a35da47
Compare
dmcgowan
approved these changes
Aug 5, 2026
This was referenced Sep 15, 2026
This was referenced Oct 31, 2026
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.
When a layer fails to prepare during parallel unpack we break out of the launch loop but never return the error, so
unpack()can report success and label the image with achainIDthat was never created.This PR keeps the error and returns it once the already queued layers have been drained, so those still commit as they would in sequential mode.
Also end the layer's tracing span, which leaked on this path.