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 |
6c38c63 to
c04be5b
Compare
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>
Set org.opencontainers.image.version in the Dockerfile so that bootc status shows a Version line for the booted deployment. The version is derived from git by the Justfile and defaults to "devel" for standalone builds. 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>
a0a7a9d to
8313658
Compare
| # extra: | ||
| # fixme_skip_if_composefs: true | ||
| # | ||
| # TODO: This test uses containers-storage transport which is not yet |
There was a problem hiding this comment.
Pulling from containers storage does work and we do it in various other tests. Are we doing something special here?
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