Skip to content

feat(install): add --yes flag for non-interactive SDK installation (EAI-7956) - #273

Open
r0x0r wants to merge 1 commit into
mainfrom
rocm-latest-version
Open

feat(install): add --yes flag for non-interactive SDK installation (EAI-7956)#273
r0x0r wants to merge 1 commit into
mainfrom
rocm-latest-version

Conversation

@r0x0r

@r0x0r r0x0r commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a --yes flag to rocm install sdk so an SDK install can proceed non-interactively, and makes overwriting an existing managed ROCm SDK an explicit, opt-in action.

  • Outside an interactive terminal, reinstalling over an existing SDK now refuses unless --yes is passed, instead of silently clobbering the active runtime.
  • A fresh install (no existing SDK) never prompts and is unaffected.
  • --yes also continues to approve required system-package installs (e.g. OpenMPI for vLLM) without asking.

Implementation notes

  • therock::install_sdk now returns SdkInstallResult { output, mutated }; callers finalize the runtime (finalize_successful_sdk_install) only when the install actually mutated state, rather than keying off dry_run alone.
  • The new yes argument is threaded through the install dispatch, the dry-run renderer, and the runtime-update path.

Testing

  • cargo test --workspace / cargo clippy --workspace --all-targets -- -D warnings.
  • Two e2e scenarios added in tests/e2e-cucumber/features/runtime_setup.feature covering the user-observable behavior:
    • runtime-install-sdk-overwrite-requires-yes (@requires-gpu) — reinstall without --yes is refused with an error explaining --yes is required. The refusal bails before any download, but the precondition (an active runtime) needs a GPU, so it runs on the GPU lane.
    • runtime-install-sdk-overwrite-with-yes (@requires-gpu @nightly) — with --yes the reinstall overwrites and the runtime stays registered/active. Nightly-gated because it performs a real second SDK install.

Both scenarios are GPU/nightly-gated and therefore exercised on the self-hosted GPU and nightly lanes, not the default PR lane.

@r0x0r
r0x0r requested a review from a team as a code owner August 18, 2026 10:10
@r0x0r r0x0r changed the title feat(install): add --yes flag for non-interactive SDK installation feat(install): add --yes flag for non-interactive SDK installation (EAI-7194) Aug 18, 2026
@r0x0r
r0x0r force-pushed the rocm-latest-version branch from 2481c80 to f268078 Compare August 18, 2026 10:15
@r0x0r r0x0r changed the title feat(install): add --yes flag for non-interactive SDK installation (EAI-7194) feat(install): add --yes flag for non-interactive SDK installation (EAI-7956) Aug 18, 2026
@r0x0r
r0x0r force-pushed the rocm-latest-version branch 4 times, most recently from b065fc1 to 792ff7f Compare August 25, 2026 08:00
@michaelroy-amd

Copy link
Copy Markdown
Member

Current head 792ff7ffce02b4107c3206ac8a10377da0ce4cde is CONFLICTING/DIRTY, so its otherwise-green checks do not validate the merge result. Please rebase onto current main, resolve the install-path conflicts, rerun the required install and Cucumber gates on the rebased head, and then re-request review.

…d update tests

Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
@r0x0r
r0x0r force-pushed the rocm-latest-version branch from 792ff7f to 0a2a239 Compare August 27, 2026 08:40
@r0x0r

r0x0r commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased onto current main (now 0a2a239) — the branch is MERGEABLE again.

Conflict resolved (1 file):

  • .github/workflows/e2e-selfhosted.ymlmain reworked the shared-runtime pre-warm block to the cache-aware cargo xtask e2e-prewarm --channel release path (EAI-8057). That supersedes this branch's edit, which had added --yes to the old inline install sdk guard. I took main's pre-warm block wholesale: the cold install it performs is a fresh install (empty tree), and per the flag's own contract a fresh install never prompts, so no --yes is needed there. The --yes feature itself (in main.rs/therock.rs) merged cleanly.

Also fixed a rebase-induced numbering collision:

  • tests/e2e-cucumber/features/runtime_setup.featuremain now uses Scenario numbers 1–5, so this branch's two new scenarios (runtime-install-sdk-overwrite-requires-yes, runtime-install-sdk-overwrite-with-yes) were renumbered from 4/5 to 6/7. The @id: tags were already unique; only the human-facing numbers collided.

Re-ran on the rebased head (local, macOS):

  • cargo test -p rocm --bin rocm therock — 77 passed (1 ignored: the ENOSPC disk-fill test)
  • cargo test -p rocm --bin rocm sdk_install_approval — the overwrite-only-prompts test passes
  • cargo test -p e2e-cucumber --no-run — Cucumber suite compiles green

The GPU/nightly install scenarios (Scenario 6/7, @requires-gpu) run on the self-hosted lane. Leak scan clean; commit signed + DCO. Re-requesting review.

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.

2 participants