Skip to content

cli: Un-hide bootupctl backend and document its verbs - #1169

Open
cgwalters-bot wants to merge 2 commits into
coreos:mainfrom
cgwalters-forge:bot/unhide-backend-verb
Open

cgwalters-bot wants to merge 2 commits into
coreos:mainfrom
cgwalters-forge:bot/unhide-backend-verb

Conversation

@cgwalters-bot

Copy link
Copy Markdown
Contributor

bootupctl backend was hidden to keep the client side less confusing, but hidden commands cause more confusion than they avoid. Image build tooling uses it, and our own README, Dockerfile.bls and tests reference backend install, generate-update-metadata and set-default-bootloader, yet --help gives no hint that these exist or what they are for.

The first commit is a prep: bootupctl backend had its own hand-synced copy of the bootupd verbs, each individually hidden, so it now reuses DVerb and both entrypoints share one set of verbs and help text. The second shows backend in bootupctl --help, after the verbs for a booted system. It gets help text saying these commands act on an OS tree or target root at build/install time, and pointing users who want to update a running system at update and adopt-and-update. A unit test keeps backend and its verbs visible and documented.

Commands:
  status            Show components status
  update            Update all components
  adopt-and-update  Update all adoptable components
  validate          Validate system state
  backend           Low-level commands for building and installing OS images

For maintainers: this reverses the intent of the removed FIXME(lucab) comment, which planned to eventually drop backend from bootupctl after coreos/fedora-coreos-config#595. Since image build tooling still relies on it, documenting it seems better than keeping it half-hidden.

The issue also suggests detecting a booted system and giving clearer guidance there. That is not done here, because backend install is legitimately run on a booted host (e.g. bootc install to-existing-root), so a simple "systemd is running" check would misfire. The help text covers the guidance for now. So this is related to #1119 rather than closing it.

Testing, on a 16-core devspace in rust:1.90.0 (the pinned lint toolchain in rust.yml): cargo fmt -- --check, cargo clippy --all-targets -- -D warnings, and cargo test --all-targets (40 passed, 1 ignored). I also checked the bootupctl --help and bootupctl backend --help output by hand.

Related: #1119

Generated-by: https://github.com/cgwalters/#llms

`bootupctl backend` had its own copy of the `bootupd` verbs that had to
be kept in sync by hand, and its variants were each individually hidden.
Share the one enum so both entrypoints get the same verbs and help text.

Prep for un-hiding `backend`.

Generated-by: AI
Hiding `backend` was meant to keep the client side less confusing, but
in practice hidden commands cause more confusion than they avoid: they
are used by image build tooling and referenced in our own docs, yet
`--help` gives no hint they exist or what they are for.

Show it, listed after the verbs for a booted system, and give it and
its verbs help text that explains they operate on an OS tree or target
root at build/install time, pointing users who want to update a booted
system at `update` and `adopt-and-update`. Add a test so the verbs stay
visible and documented.

Note this reverses the intent of the deleted FIXME(lucab) comment,
which planned to eventually drop `backend` from bootupctl once
coreos/fedora-coreos-config#595 was refreshed. Since image build tooling
still relies on it, making it a documented interface seems better, but
that is a call for the maintainers.

Related: coreos#1119
Generated-by: AI
@openshift-ci

openshift-ci Bot commented Oct 7, 2026

Copy link
Copy Markdown

Hi @cgwalters-bot. Thanks for your PR.

I'm waiting for a coreos member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: coreos/bootupd/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 24ba106c-40c8-4755-aeac-492675398bec
📥 Commits

Reviewing files that changed from the base of the PR and between c5de0ad and a5fa13e.

📒 Files selected for processing (3)
  • src/cli/bootupctl.rs
  • src/cli/bootupd.rs
  • src/cli/mod.rs

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (8)
  • GitHub Check: testing-farm:fedora-rawhide-x86_64
  • GitHub Check: testing-farm:centos-stream-10-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
  • GitHub Check: testing-farm:fedora-rawhide-x86_64
  • GitHub Check: testing-farm:centos-stream-10-x86_64
  • GitHub Check: rpm-build:fedora-rawhide-x86_64
  • GitHub Check: rpm-build:centos-stream-10-x86_64
🔇 Additional comments (3)
src/cli/bootupd.rs (1)

39-44: LGTM!

Also applies to: 46-51, 53-53, 108-108, 122-132, 137-137

src/cli/bootupctl.rs (1)

60-67: LGTM!

Also applies to: 119-119

src/cli/mod.rs (1)

61-76: LGTM!


📝 Walkthrough

Walkthrough

The backend subcommand is now visible and uses DVerb for dispatch. Backend verbs have expanded help text, and a test checks that the command and its verbs are visible and documented.

Changes

Backend CLI

Layer / File(s) Summary
Backend verb dispatch
src/cli/bootupd.rs
DVerb::run dispatches verbs to their existing handlers, and DCommand::run delegates to it. Help text for generate-update-metadata and install is expanded. The GenerateOpts.sysroot documentation now states that only / is supported.
Backend command visibility
src/cli/bootupctl.rs, src/cli/mod.rs
The visible backend subcommand carries DVerb directly. The separate CtlBackend enum and its dispatch arms are removed. A test checks visibility and help text for the backend command and each verb.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to a5fa1

The backend commands are now visible, with their prior dispatch behavior preserved. No concrete merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title describes the change, but it violates the required format because the description starts with uppercase “Un-hide” instead of lowercase. Change the title to use lowercase after the colon, such as “cli: un-hide bootupctl backend and document its verbs”. Keep the imperative mood and omit a trailing period.
Commit Message Convention ⚠️ Warning Both non-merge commit subjects fail the required lowercase description rule. The subjects are cli: Un-hide ... and cli: Reuse ...; each description starts with an uppercase letter. Both otherwise … Amend the commit subjects so their descriptions start with lowercase imperative verbs. For example: cli: un-hide bootupctl backend and document its verbs and cli: reuse DVerb for bootupctl backend.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description explains why bootupctl backend is visible, describes the shared verbs and help text, and reports testing. It is related to the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Commit Message Convention

Explanation

Both non-merge commit subjects fail the required lowercase description rule. The subjects are cli: Un-hide ... and cli: Reuse ...; each description starts with an uppercase letter. Both otherwise use the subsystem: description structure and have no trailing period.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant