Skip to content

fix(core): prefer runtime bootc tag over build-time image-info - #23

Open
castrojo wants to merge 1 commit into
mainfrom
fix/image-tag-from-bootc-status
Open

fix(core): prefer runtime bootc tag over build-time image-info#23
castrojo wants to merge 1 commit into
mainfrom
fix/image-tag-from-bootc-status

Conversation

@castrojo

@castrojo castrojo commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Closes projectbluefin/common#820

get_system_info() previously reported the image tag baked into /usr/share/ublue-os/image-info.json at build time. After a bootc switch, that tag is stale and bctl status shows the old tag.

Changes:

  • Parse the tag from bootc status --json and use it when available.
  • Fall back to image-info.json when bootc is missing or the runtime ref has no tag.
  • Add tests covering standard refs, registry:port refs, digest refs, bare refs, and the bootc-status precedence.

Validation:

  • pytest — 111 passed
  • ruff check — clean
  • mypy — clean

get_system_info() previously reported the image tag baked into
/usr/share/ublue-os/image-info.json at build time. After a
bootc switch, that tag is stale and bctl status shows the old
tag. Parse the tag from bootc status --json and use it when
available, falling back to image-info.json when bootc is missing
or the runtime ref has no tag.

Relates-to: projectbluefin/common#820
Assisted-by: Claude via pi
@castrojo

Copy link
Copy Markdown
Contributor Author

Vanguard Lab Strike Report — bluefinctl#23

Field Value
Workflow bluefinctl-pr-23-test-fjh7d
Phase Succeeded
Duration 20s
PR head SHA 5c3595648a3f
Suites / tests full pytest suite

Results

111/111 tests passed (0 failures, 0 skipped)

Workflow output confirms the suite was cloned from branch fix/image-tag-from-bootc-status at projectbluefin/bluefinctl and the venv-based pytest run completed green.

Evidence collected

  • argo_get_workflow — phase Succeeded, node summary 1/1
  • k8s_pods_log — test run log captured (111 passed in 2.36s)

Merge eligibility

  • Lab workflow successful
  • GitHub Actions test (3.13) still pending
  • Required approvals / merge rules not confirmed from this context

Lab test is green; waiting on GitHub Actions and review before merge queue.

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. The runtime-tag precedence is correct and the fallback chain is sound. _tag_from_image_ref handles the tricky cases properly — registry:port refs (rsplit on the last colon, then the '/' guard rejects 5000/bluefin), digest refs (@ guard), and bare refs — and the booted.image.image.image nesting matches bootc's status schema. Tests cover the precedence and both fallback paths. CI green (test 3.13). LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bctl shows the wrong image tag

2 participants