Skip to content

Conversation

@HastD
Copy link

@HastD HastD commented Dec 23, 2025

Under some circumstances—for example, if a new exclusive component has been added since the prior build—packing with a prior build structure can fail. When this happens, we can simply discard the prior build data and make a new packing structure, rather than having chunking fail entirely.

This should fix coreos/rpm-ostree#5545, and I think it'll also fix the test failure that was observed in CI for coreos/rpm-ostree#5535.

Under some circumstances--for example, if a new exclusive component has
been added since the prior build--packing with a prior build structure
can fail. When this happens, we can simply discard the prior build
data and make a new packing structure, rather than having chunking fail
entirely.
@github-actions github-actions bot added the area/ostree Issues related to ostree label Dec 23, 2025
@bootc-bot bootc-bot bot requested a review from ckyrouac December 23, 2025 16:35
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves the robustness of the chunking process by handling failures when reusing a prior build's packing structure. Instead of panicking, it now gracefully falls back to creating a new packing structure. The changes include replacing panic! with bail! for recoverable errors and wrapping the call to basic_packing_with_prior_build in a match to handle the error case. This is a solid improvement. I've added one suggestion to further improve robustness by replacing an assert! with a check that returns a Result, which is in line with the goals of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ostree Issues related to ostree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build-chunked-oci crashes if target image used as baseline and xattrs for non-rpm contents has changed

1 participant