Repository navigation
fix(launch): a --param-file sweep is a flags launch, and needs no spore name (#1532) - #1542
Merged
Merged
Conversation
Contributor
Author
|
Live check at I ran
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ines (#1532) A --param-file sweep with its instance type only in the file's defaults: is a flags launch on a TTY, not the wizard, so --no-public-ip is not refused as a wizard launch; a real wizard launch still is. A sweep needs no spore name (members are named by row, else <sweep-name>-<index>); every other launch still does. Every '# Use with: spawn ...' line in examples/*params*.yaml must parse through the real command. Fixes #1532
scttfrdmn
force-pushed
the
fix/1532-param-file-sweep-mode
branch
from
November 6, 2026 06:30
bcffa5f to
b3e853b
Compare
This was referenced Nov 6, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Launch mode
launchModenow takes aparamSweepargument. A--param-file/--paramssweep ismodeFlagswhatever the TTY,--instance-typeand--interactive, becauserunLaunchsends it to the sweep path before the wizard ever runs.currentLaunchMode()is the one caller-facing form. The two pre-flight guards and the dispatch all read it:validateNoPublicIPPath(batchQueue, wizard)validateNestedSpawnRoleFlags(wizard)switchSo a guard now judges the path the launch actually takes. A seam,
stdinIsTerminal, lets tests driverunLaunchas a TTY caller would.--instance-typeon a TTY or with--interactive. Such a launch is still refused for--no-public-ip.--interactiveon a sweep: still refused, as a sweep flag (Foreground sweeps silently drop --fsx-create, --fsx-recall and --vpc (without --subnet) #1366), never with the wizard message.2. Spore name: optional on a sweep (behaviour fix, not doc edits)
launchNameArgsno longer requires a name when the parsed flags make the launch a sweep, byisSweepLaunch's rule:--param-file/--paramswithout--batch-queue/--queue-template.Why not default the name from
--sweep-name:buildLaunchConfigcopies--nameinto the base config, and every member inherits it. Sospawn launch swr --param-file …names every memberswr, and the per-member default<sweep-name>-<index>(defaultSweepMember) never applies. Defaulting the name to--sweep-namewould give every member the same name too. Leaving it empty lets the existing per-member naming work: a row'sname:, else<sweep-name>-<index>, orsweep-<index>without--sweep-name. Users copy the examples, so the examples now just work.Unchanged:
Other callers:
spawn slurm submitstill passesslurm.SporeName(job). That is harmless, since each converted row setsname:from the same value. Only its comment changed.spawn launchsweep argv.Tests
TestLaunchMode: sweep rows for TTY, pipe, with a type and with--interactive.TestParamFileSweepWithoutInstanceTypeIsNotTheWizard: throughrunLaunchon a TTY, withinstance_typeonly indefaults:, no--instance-typeand no name, with and without--no-public-ip --subnet-id. It reaches the detached sweep path: theSpawnSweepCrossAccountRolelookup and its refusal, with nothing created. It is never refused as a wizard launch.withLogDir(t, false)is set.TestInteractiveLaunchStillGetsTheWizard: a non-sweep launch with no type on a TTY, and one with--interactive, get the wizard's--no-public-iprefusal.TestInteractiveSweepIsRefusedAsASweep.TestSweepNameArgs: the name rules for sweep and non-sweep launches.TestNamelessSweepMembersAreNamedBySweep: members are namedswr-0, or by their row'sname:.TestExampleParamFileUsageLinesAreAccepted: each# Use with: spawn …line inexamples/*params*.yamlgoes throughrootCmd.Find, the command's flags and itsArgsvalidator. Aspawn launchline must also be a flags launch on a TTY, and its param file must parse.Revert evidence
paramSweepshort-circuit:TestLaunchModefails on 3 rows.a --param-file sweep was refused as a wizard launch (#1532): --no-public-ip is not supported by the interactive wizard…."launch --param-file simple-params.yaml --sweep-name simple-experiment" is mode 1 on a TTY, want a flags launch.launchNameArgs:TestSweepNameArgsfails 3 cases witha spore name is required….spawn launch rejects "launch --param-file simple-params.yaml --sweep-name simple-experiment": a spore name is required….Checks (all pass, tree clean after regeneration)
make checkgo test ./...with the AWS env strippedmake test-e2e-tier0semgrep scan --config=auto --error .make gen-docs(no change)make api-snapshotmake cli-iam-actionsNot in this PR
Several examples pass a param file to
--params, which only takes inline JSON and is not implemented. That is filed as #1540.Fixes #1532