status: Render cached update info in human-readable output#2047
status: Render cached update info in human-readable output#2047cgwalters wants to merge 3 commits intobootc-dev:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request enhances the bootc status command to display cached update information, which is populated by bootc upgrade --check. The implementation is well-structured, introducing a new render_cached_update function and a format_timestamp helper. The changes are thoroughly tested with new unit tests and an integration test, covering various scenarios. The unrelated documentation changes to rename --insecure to --allow-missing-verity also improve clarity. Overall, this is a solid improvement to user experience.
|
The |
Run update-generated to sync man pages and tmt plans with current CLI options and test summaries. Assisted-by: OpenCode (Claude claude-opus-4-6) Signed-off-by: Colin Walters <walters@verbum.org>
Deduplicate the timestamp formatting code used in human-readable status output. The format string was inlined with a multi-line comment explaining it; extract it into a named function. Assisted-by: OpenCode (Claude claude-opus-4-6) Signed-off-by: Colin Walters <walters@verbum.org>
After running `bootc upgrade --check`, the registry metadata for a newer image is cached in ostree commit metadata. The `bootc status` command already reads this into the `cachedUpdate` field and exposes it in JSON/YAML output, but the human-readable output never displayed it. This meant users had to parse structured output or re-run `upgrade --check` to see available updates. Render the cached update inline with each deployment entry, showing version, timestamp, and digest when the cached digest differs from the currently deployed image. Relates: https://issues.redhat.com/browse/RHEL-139384 Assisted-by: OpenCode (Claude claude-opus-4-6) Signed-off-by: Colin Walters <walters@verbum.org>
| discover: | ||
| how: fmf | ||
| test: | ||
| - /tmt/tests/tests/test-35-upgrade-preflight-disk-check |
There was a problem hiding this comment.
Should add add extra-fixme_skip_if_composefs: true for this test to fix CI test failures.
| assert ($v2_cached.imageDigest != $booted_digest) "Cached update digest should differ from booted" | ||
|
|
||
| # Verify human-readable output contains update info | ||
| let human_output = bootc status |
There was a problem hiding this comment.
Need --format humanreadable
| assert ($v3_cached.imageDigest != $v2_cached.imageDigest) "v3 cached digest should differ from v2" | ||
|
|
||
| # Verify human-readable output updated to v3 | ||
| let human_output_v3 = bootc status |
There was a problem hiding this comment.
Need --format humanreadable
After running
bootc upgrade --check, the registry metadata for anewer image is cached in ostree commit metadata. The
bootc statuscommand already reads this into the
cachedUpdatefield and exposesit in JSON/YAML output, but the human-readable output never displayed
it. This meant users had to parse structured output or re-run
upgrade --checkto see available updates.Render the cached update inline with each deployment entry, showing
version, timestamp, and digest when the cached digest differs from
the currently deployed image.
Relates: https://issues.redhat.com/browse/RHEL-139384