Skip to content

Add an "upgrade from previous" test#2060

Open
cgwalters wants to merge 1 commit intobootc-dev:mainfrom
cgwalters:upgrade
Open

Add an "upgrade from previous" test#2060
cgwalters wants to merge 1 commit intobootc-dev:mainfrom
cgwalters:upgrade

Conversation

@cgwalters
Copy link
Collaborator

We have tests that do upgrades, but they start from the new bootc. Add a just+CI workflow that starts from a stable shipped image (we just need to inject tmt deps + nu).

The readonly test then gains a helper which optionally performs an upgrade to the new target.

IOW the flow is

  • deploy stock image with unmodified bootc etc
  • upgrade
  • run readonly tests

It could of course make sense to run all of the tests this way as an optional thing, nothing blocks that, but it would be another entry in our matrix and we're going to need to figure out how to wrangle that matrix size.

Also do to that we'd need to abstract over TMT_REBOOT_COUNT.

Assisted-by: OpenCode (Claude claude-opus-4-6)

We have tests that do upgrades, but they start from the *new* bootc.
Add a `just`+CI workflow that starts from a stable shipped image
(we just need to inject tmt deps + nu).

The readonly test then gains a helper which optionally performs
an upgrade to the new target.

IOW the flow is

- deploy stock image with unmodified bootc etc
- upgrade
- run readonly tests

It could of course make sense to run *all* of the tests this
way as an optional thing, nothing blocks that, but it would
be *another* entry in our matrix and we're going to need
to figure out how to wrangle that matrix size.

Also do to that we'd need to abstract over TMT_REBOOT_COUNT.

Assisted-by: OpenCode (Claude claude-opus-4-6)
Signed-off-by: Colin Walters <walters@verbum.org>
@bootc-bot bootc-bot bot requested a review from gursewak1997 March 12, 2026 15:11
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new test for upgrading from a previously shipped image, which is a valuable addition to the test suite. The implementation is mostly solid, introducing a new Justfile target, a Dockerfile for the source image, and nushell test logic. I've found one potential bug in the test verification logic within a nushell script and provided a suggestion to fix it.

Comment on lines +63 to +64
assert equal $booted.image.transport "containers-storage"
assert equal $booted.image.image $upgrade_image
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The way you're accessing the fields from the bootc status --json output appears to be incorrect. After let booted = $st.status.booted.image, the $booted variable should hold a record with transport and image fields. Therefore, you should access them directly as $booted.transport and $booted.image, not $booted.image.transport and $booted.image.image.

            assert equal $booted.transport "containers-storage"
            assert equal $booted.image $upgrade_image

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.

1 participant