-
Notifications
You must be signed in to change notification settings - Fork 167
ostree-ext: Make new packing if using prior build fails #1880
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
|
Failure has been fixed by #1882. Thanks! |
|
@henrywang Sorry, I'm not sure I understand—what does that PR have to do with this one? |
There's a failure on |
e1e6807 to
9b3aea9
Compare
|
Could you please sign off commit which is required by |
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. Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
9b3aea9 to
2df4be5
Compare
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.