Skip to content

fix(launch): parameter sweeps carry or refuse every launch flag (#1366) - #1392

Merged
scttfrdmn merged 2 commits into
mainfrom
fix/1366-foreground-sweep-dropped-flags
Oct 28, 2026
Merged

scttfrdmn merged 2 commits into
mainfrom
fix/1366-foreground-sweep-dropped-flags

Conversation

@scttfrdmn

@scttfrdmn scttfrdmn commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1366

What was dropped (verified with tests on the foreground member-building path)

All three of the issue's claims are confirmed. The flag gate turned up more drops, and those are fixed here too.

Setting Before (foreground sweep) Now
--fsx-create (+ --fsx-lifecycle/-ttl/-storage-capacity/-throughput/-s3-bucket/-import-path/-export-path) dropped: no filesystem refused, before any AWS call: "create or recall the filesystem first ... and pass its --fsx-id"
--fsx-recall dropped refused, same remedy
--vpc without --subnet dropped: default VPC refused: "Pass --subnet with a subnet in that VPC" (--vpc with --subnet is accepted)
--efs-id, --efs-mount-point, --efs-mount-options, --efs-profile tagged, never mounted carried: the member's user data mounts it (launchStorageScript, shared with the single launch)
--fsx-id, --fsx-mount-point, --fsx-skip-validate tagged, never mounted carried: looked up once per region before anything is created, mounted, mount name tagged
--attach-volume attached, never formatted/mounted carried: mounted
--spot-max-price dropped (only batch-queue read it) carried via sweepBaseConfig; a row's spot_max_price: wins
--strata-* dropped refused (follow-up #1391 to carry)
--dns-domain/-api-endpoint/-function-arn dropped: row dns: registered with spore.host refused (#1391)
--nist-800-171/-53, --compliance-strict dropped: no enforcement refused (#1391)
--allow-cidr, --efa-group dropped: a sweep creates no SG refused, remedy --security-group
--count, --job-array-name, --instance-names, --min-viable, --mpi*, --auto-placement-group, --template-var, --interactive dropped refused
--cartesian deprecated and inert (#674) accepted with cobra's warning (CLI-only no-op)

Every other launch flag is recorded in cmd/launch_sweep_flags.go as reaching the members through their config, reaching them through the user-data builder, steering the sweep, or acting on the CLI only. The previous test-only manifest (sweepFlagCoverage) checked only whether a flag's variable appeared in launch_config.go. By that check it listed --fsx-create, --fsx-recall and --efs-id as honoured, and it is replaced.

The detached path (#1353) now has the same storage mounts and the same refusal text for the three shared refusals (sweepMemberGuard). Its --fsx-id remedy used to be untrue there as well: the filesystem was tagged and never mounted.

Gates (each watched failing against a compiling revert)

Carried, asserted on the member's launch input:

  • TestForegroundSweepMembersMountEFS / ...MountFSx / ...MountAttachedVolumes: revert: renderForegroundSweepUserData passes "", nil, so all three fail and the field gate fails for EFSID/EFSMountPoint/FSxLustreID/FSxMountPoint/AttachVolumes.
  • TestForegroundSweepMembersMountFSx (tag half): revert: drop the FSxMountName backfill.
  • TestDetachedSweepMembersMountStorage: revert: detachedMemberUserData passes "", nil.
  • TestSweepMembersCarrySpotMaxPrice: revert: drop the sweepBaseConfig lines, which also fails TestSweepFlagRulesHoldAgainstTheCode/spot-max-price.

Refused, with zero AWS calls (fake endpoint counts requests, and the identity lookup counts too):

  • TestSweepRefusalsMakeNoAWSCall: the issue's three by name, plus every refused flag from the table. Revert: if false && isSweepLaunch(). Every subtest fails (made 1 AWS call(s) ... [GetCallerIdentity]). Reclassifying fsx-create, fsx-recall or vpc in the table also fails it.
  • TestSweepMemberBuildersRefuseWhatNoSweepCanLaunch (backstop on both paths, same message): revert each sweepMemberGuard case, or its call in foregroundSweepMembers.
  • TestSweepAcceptsVPCWithSubnet: revert: drop unlessSet.

Discovery:

  • TestEveryLaunchFlagHasASweepRule (cobra flag discovery): revert: add a zz-new-flag.
  • TestForegroundSweepCarriesOrRefusesEveryLaunchSetting (reflection over LaunchConfig, every claim checked against settings, tags, user data and the guard): revert: add a ZZNewSetting field.
  • TestSweepFlagRulesHoldAgainstTheCode sets each flag and builds a real foreground member. It fails when a flag reclassified as carried sets a field the member drops (fsx-s3-bucket), when a user-data flag is called CLI-only (efs-mount-options), and when a flag said to steer is never read by the sweep path (skip-region-check).

Notes

Checks: make check, make lint (0 issues), semgrep scan --config=auto --error . clean, make api-snapshot no change, make check-docs clean (no help text changed). Not run on AWS.

@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.51852% with 29 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/launch_sweep.go 56.25% 14 Missing ⚠️
cmd/launch_storage.go 88.46% 6 Missing ⚠️
cmd/launch_sweep_detached_bootstrap.go 50.00% 5 Missing ⚠️
cmd/launch_single.go 62.50% 3 Missing ⚠️
cmd/launch_sweep_flags.go 96.77% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

A foreground sweep (--no-detach) accepted --fsx-create, --fsx-recall and
--vpc without --subnet and launched every member without them. Both sweep
paths now refuse those before any AWS call, with one remedy (--fsx-id /
--subnet), and refuse every other flag a sweep cannot honour (Strata,
custom DNS target, compliance mode, --allow-cidr, --efa-group, the
job-array and MPI flags, --interactive, --template-var, --cartesian).

Sweep members on both paths now mount --efs-id, --fsx-id and
--attach-volume storage (launchStorageScript, shared with the single
launch), and --spot-max-price reaches them.

Every launch flag has a sweep rule (cmd/launch_sweep_flags.go), checked
against a real foreground member, and every LaunchConfig field a
foreground disposition, checked the same way.
It does nothing (#674) and cobra already warns; refusing it broke scripts
and protected nothing.
@scttfrdmn
scttfrdmn force-pushed the fix/1366-foreground-sweep-dropped-flags branch from 101f45b to 3c83316 Compare October 28, 2026 19:26
@scttfrdmn
scttfrdmn merged commit 50fb9c8 into main Oct 28, 2026
9 checks passed
@scttfrdmn
scttfrdmn deleted the fix/1366-foreground-sweep-dropped-flags branch October 28, 2026 19:54
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.

Foreground sweeps silently drop --fsx-create, --fsx-recall and --vpc (without --subnet)

1 participant