Skip to content

bootc Justfile: test-tmt drops CLI variable overrides #94

Open

Description

@cgwalters-bot

test-tmt runs _build-upgrade-image and test-tmt-nobuild as fresh just processes, losing overrides like variant=composefs (run-tmt gets BOOTC_variant=ostree, upgrade image built with default boot_type/seal_state). Found while testing the zstd:chunked tmt test. Fix: make them dependencies.

Activity

  1. converted this from a draft issue on Sep 26, 2026
  2. locked as resolved and limited conversation to collaborators on Oct 18, 2026
  3. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    ❌ dispatch failed (agent, check, apply: failure/skipped/skipped; the agent's exit state: 1).

  4. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Valid and reproducible; still wanted; one small PR.

    On bootc main (de7ae55), test-tmt still runs @just _build-upgrade-image and @just test-tmt-nobuild {{ARGS}} as new just processes. just only passes variables set on the command line to the recipes of its own invocation, so the nested processes go back to the env("BOOTC_*") defaults. I reproduced this with just 1.45.0:

    • just --dry-run variant=composefs boot_type=uki test-tmt readonly: build gets variant=composefs/boot_type=uki, but the body is only just _build-upgrade-image + just test-tmt-nobuild readonly.
    • A small test Justfile with a variable v: just v=b outer (nested just inner) prints v=a. With fixed *ARGS: (inner ARGS) it prints v=b args=x y.

    Effects:

    • test-composefs passes everything as CLI overrides to test-tmt, so running it locally builds a bls/unsealed upgrade image and runs the tests with BOOTC_variant=ostree. 030-test-composefs.nu then expects ostree.
    • CI is not affected: ci.yml exports BOOTC_variant/BOOTC_boot_type/... to $GITHUB_ENV, and nested just processes inherit those. Exporting the env vars locally (as the Justfile header suggests) is the workaround.
    • test-baseconfigs/test-tmt-baseconfig (L301-L322) have the same pattern for any override other than the ones they hard-code.

    No open bootc PR touches this. The cgwalters-forge/bootc fork has the same code. Fix: turn the nested calls into dependencies (test-tmt *ARGS: build _build-upgrade-image (test-tmt-nobuild ARGS)). It can be tested without VMs using just --dry-run.

    Before dispatch: dispatch.toml allows only the fork cgwalters-forge/bootc, not bootc-dev/bootc, and a plan's item has to be an issue in its target repo. No fork issue exists for this yet, and this triage run can't open one, so the plan below has no item and dispatch will refuse it as written. Open a fork issue with the brief (as for cgwalters-forge/bootc#46) and re-post the plan with "item": <that number>. Or, since it's a ~3-line Justfile change, send it straight upstream.

    Unclear: should test-tmt-baseconfig also forward filesystem/boot_type/seal_state/base? The plan lets the implementer do it, or leave it and say why in the PR.

    {
      "schema": "agent-board/job-plan/v1",
      "repo": "cgwalters-forge/bootc",
      "kind": "implement",
      "runner": "hosted",
      "brief": "In bootc-dev/bootc's Justfile, `test-tmt` (currently lines 189-193) runs `@just _build-upgrade-image` and `@just test-tmt-nobuild {{ARGS}}` as fresh just processes, so variable overrides given on the command line (`just variant=composefs boot_type=uki test-tmt ...`, and every override `test-composefs` passes when it calls `just variant=composefs ... test-tmt`) are lost: run-tmt gets BOOTC_variant=ostree and the upgrade image is built with the default boot_type/seal_state/filesystem. Tracked in cgwalters-forge/tracker#94; the PR is staged on the cgwalters-forge/bootc fork for the operator to promote upstream.\n\nFix: make them dependencies so they run in the same just invocation and see the same variables: `test-tmt *ARGS: build _build-upgrade-image (test-tmt-nobuild ARGS)` with an empty body (just runs dependencies in order and passes a variadic parameter through as `ARGS`; check that ARGS containing `--flag=value` arguments, as test-composefs passes, still arrive as separate words). In the same PR, fix the nested calls with the same problem where it is cheap: `test-baseconfigs` (`just test-tmt-baseconfig ...` three times) can become dependencies `(test-tmt-baseconfig \"etc-transient\" ARGS)` etc.; `test-tmt-baseconfig` hard-codes variant=composefs and baseconfigs on purpose but drops any other override (filesystem, boot_type, seal_state, base), so either pass these through explicitly or leave it as it is and say why in the PR. Do not change behaviour when overrides come from BOOTC_* env vars (CI's path).\n\nTesting (no VMs needed): `just --dry-run variant=composefs boot_type=uki seal_state=sealed test-tmt readonly` must print the _build-upgrade-image podman build with `boot_type=uki` and `seal_state=sealed`, and the run-tmt line with `--env=BOOTC_variant=composefs`. Before the fix it prints only `just _build-upgrade-image` / `just test-tmt-nobuild readonly`. Do the same for `just --dry-run test-composefs systemd ext4 uki sealed readonly` and for plain `just --dry-run test-tmt integration` (CI's ostree leg must be unchanged). Run `just --list` and `just --fmt --check --unstable` if the repository uses them. Commit message prefix `Justfile:`."
    }
    

    Generated by dispatch · ◷

  5. cgwalters-bot commented on Oct 22, 2026

    @cgwalters-bot
    CollaboratorAuthor

    Still valid; nothing has changed since the previous triage. It needs an operator decision, not another plan.

    As of 21 Oct, bootc main is still de7ae55. test-tmt still runs @just _build-upgrade-image / @just test-tmt-nobuild {{ARGS}} as new just processes, and test-baseconfigs/test-tmt-baseconfig do the same. No open bootc PR touches these recipes; I checked bootc-dev/bootc#2581 and bootc-dev/bootc#2583, which are the open tmt/CI ones. The reproduction and the plan in the previous comment still apply as written.

    Decision for @cgwalters: that plan can't dispatch. dispatch.toml allows cgwalters-forge/bootc, but a plan needs an item that is an issue in that repo, and the fork has no issue for this (its only issue is cgwalters-forge/bootc#46). Options:

    1. Open a cgwalters-forge/bootc issue with the previous plan's brief. Then re-post the plan with "item": <n>, and an implement run stages the PR on the fork.
    2. Skip the board and send the ~3-line Justfile change (test-tmt *ARGS: build _build-upgrade-image (test-tmt-nobuild ARGS)) straight to bootc-dev/bootc, then close this issue.
    3. Leave it. CI is unaffected because it exports BOOTC_* env vars, and exporting them locally works around it. Close as not planned.

    Triage runs can't open issues in other repositories, so this stays parked until you pick one.

    Generated by dispatch · ◷

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions