Repository navigation
ostree-ext: Point ostree container commit users at bootc container lint - #8
cgwalters-bot wants to merge 2 commits into
Conversation
a88c2e5 to
78bd310
Compare
| const CONTAINER_COMMIT_NOOP_MSG: &str = "note: `ostree container commit` is no longer needed and \ | ||
| can be removed from container builds. It no longer cleans /run, /tmp, /var/tmp or /var/cache; \ | ||
| use `dnf clean all` or `RUN --mount=type=cache,target=/var/cache/...` to keep images \ | ||
| small, and `bootc container lint` to check the image."; |
There was a problem hiding this comment.
No we can't do that I was wrong, let's keep our current semantics BUT add a loud note (with a short e.g. 5s sleep) that bootc container lint is the new interface.
There was a problem hiding this comment.
Done in 7cb98ec: ostree container commit keeps its current behavior (still requires an ostree container and empties /run, /tmp, /var/tmp and /var/cache), but first prints a boxed note on stderr that it is deprecated in favor of bootc container lint, then sleeps 5s. The unit test checks the note's text and doesn't sleep. On a devspace, a derived centos-bootc:stream10 build with this bootc showed the note, took 5s and still cleaned those directories. Title, body and commit message are updated; I changed Closes: #2396 to Related: since that issue asks for a no-op.
Generated-by: https://github.com/cgwalters/#llms
The integration test jobs consume the RPMs built by the package job in the same workflow run. With a 1 day retention, re-running a flaked test job on a PR that has been sitting for more than a day fails with "Artifact not found for name: packages-<os>", and the only way out is re-running the whole workflow, including rebuilding the packages. The tradeoff is storage: each packages-<os> artifact is about 8MB, and at recent volume (~10-25 runs a day, 5-6 OSes) a week of them is a few GB at steady state rather than a few hundred MB. That's still small next to the tmt-log artifacts each run uploads with the default 90 day retention (tens of MB each, dozens per run), and artifact storage isn't billed for public repositories anyway. We could go longer if a week turns out not to be enough. Related: bootc-dev#2177 Generated-by: AI Signed-off-by: Colin Walters <[email protected]>
78bd310 to
7cb98ec
Compare
ostree container commit a no-opostree container commit users at bootc container lint
… lint` People keep carrying `RUN ... && ostree container commit` in their Containerfiles because older docs told them to, while `bootc container lint` is now the supported way to check a bootc image. We can't just drop or neuter the command: existing builds rely on it emptying /run, /tmp, /var/tmp and /var/cache, and changing that would silently grow images or leak build-time files into layers. So keep its behavior, but print a prominent note on stderr that it is deprecated in favor of `bootc container lint`, and pause for 5 seconds so the note stands out in build logs rather than scrolling by. Related: bootc-dev#2396 Generated-by: AI Signed-off-by: Colin Walters <[email protected]>
7cb98ec to
e0710c4
Compare
|
Signed off 1 commit(s) with |
e0710c4 to
42dfeb6
Compare
|
Opened upstream as bootc-dev#2504. Closing this review draft. |
People keep putting
RUN ... && ostree container commitin their Containerfiles because older docs told them to, whilebootc container lintis now the supported way to check a bootc image. Making the command a no-op would silently change what ends up in existing images (it empties /run, /tmp, /var/tmp and /var/cache), so this keeps its behavior as is. It now prints a prominent deprecation note on stderr pointing atbootc container lint, then pauses 5 seconds so the note stands out in build logs.Related: bootc-dev#2396
Testing
On a 16-core RHEL 10 devspace, branch head 7cb98ec (on main 41049cc):
just validatepassed.just unit-testspassed: 444 tests, including the newcommit::tests::container_commit_notice, which checks the note's text (the sleep lives outside the tested function, so the suite doesn't wait).just buildbuilt the image (bootc-202609252226.g7cb98ecb5d). I copied its/usr/bin/bootcontoquay.io/centos-bootc/centos-bootc:stream10and ranostree container commitin aRUNstep that first writes files to /var/cache, /var/tmp and /tmp. The note was printed, the command took 5s, and the files were removed as before. The same step on the stock image took 0s, printed nothing and removed the files too.Generated-by: https://github.com/cgwalters/#llms
Review draft in cgwalters-forge, not upstream yet. This section is removed when the PR is opened upstream.
bootc-dev/bootc, basemainPVTI_lAHOAQ_SPs4Bj2Gizg8PhvcTo review:
/promoteon a line of its own, to open it upstream, ready for review. Either covers only the commits pushed so far.Signed-off-by: Colin Walters <[email protected]>to the commits lacking it (the bot's and yours; anyone else's only if you ask), with you as committer./draftline (in the same comment or before) to open it upstream as a draft (/readyundoes that).