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
snap: use the -no-fragments mksquashfs option #4396
Conversation
Use of the Squashfs fragments feature results in unpredictable snap composition due to how fragments are gathered and compressed using a separate thread in mksquashfs. Disable fragments entirely in `snap pack` and tests that call mksquashfs directly so that the review tools can perform validation of snaps and to be consistent with what snapcraft is doing. Fixes: https://launchpad.net/bugs/1576763 Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Codecov Report
@@ Coverage Diff @@
## master #4396 +/- ##
==========================================
+ Coverage 78.03% 78.04% +<.01%
==========================================
Files 449 449
Lines 30906 30907 +1
==========================================
+ Hits 24118 24121 +3
+ Misses 4775 4774 -1
+ Partials 2013 2012 -1
Continue to review full report at Codecov.
|
I've restarted Travis job since it hit a timeout. |
Gosh. We shouldn't have all those |
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.
Thanks for the PR! :)
else | ||
mksquashfs "$dir" "$snap" -comp gzip -Xcompression-level 1 | ||
mksquashfs "$dir" "$snap" -comp gzip -Xcompression-level 1 -no-fragments |
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.
Not blocking on this, but -no-fragments is only interesting for store uploads, and anything using -comp gzip is not going to be uploaded to the store anyway (since the resquash tests would fail).
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.
I paused before adding it to that mksquashfs command precisely because of what you mentioned. Even though it isn't going to be uploaded to the store, I think it is still work testing with similar arguments to what all other snaps will be generated with.
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.
@chipaca should comment on this part, but iirc gzip is being used to help address travis timeouts because it is faster. Is -no-fragments slower than without it?
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.
No, in my testing, the -no-fragments
option actually speeds up mksquashfs ever so slightly.
I've restarted travis since it timed out. |
@chipaca Yes, please feel free to push a commit to use |
The test failures are unrelated to the changes in this PR. Three test runs have failed due to Travis timeouts and another due to HTTP requests to the store timing out. |
Is there anything preventing this change from being merged? The corresponding change to snapcraft has been merged (canonical/snapcraft@9a131cb) so I'd hate for this PR to linger for too long since we'd like to change the review-tools to require |
@tyhicks just that testing infra is a bit broken, as soon as it's passing things this'll get merged |
Use of the Squashfs fragments feature results in unpredictable snap
composition due to how fragments are gathered and compressed using a
separate thread in mksquashfs. Disable fragments entirely in
snap pack
and tests that call mksquashfs directly so that the review tools can
perform validation of snaps and to be consistent with what snapcraft is
doing.
Fixes: https://launchpad.net/bugs/1576763
Signed-off-by: Tyler Hicks tyhicks@canonical.com
This PR corresponds to the following:
canonical/snapcraft#1805
https://forum.snapcraft.io/t/proposal-to-disable-squashfs-fragments-in-snaps/3103