Repository navigation
fix(launch): carry --tag and --team to sweep members and the batch queue (#1356) - #1365
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…eue (#1356) spawn launch --tag and --team were merged in runLaunch only after the parameter-sweep and batch-queue paths had been handed off, so both accepted and silently dropped them. applyLaunchFlagTags now merges them on every path: the single launch, sweepBaseConfig (every foreground, detached and multi-region member starts from it) and batchQueueLaunchConfig. A malformed or spawn:-prefixed --tag is refused before any AWS call on every path.
scttfrdmn
force-pushed
the
fix/1356-sweep-tags-team
branch
from
October 27, 2026 05:10
3cdb712 to
d4d69ac
Compare
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.
Fixes #1356
spawn launch --tag k=vand--teamwere merged inrunLaunchonly after the parameter-sweep and batch-queue dispatches had returned, so on those paths both flags were accepted and silently dropped.Paths
applyLaunchFlagTagssweepBaseConfigmerges them into the base config;buildLaunchConfigFromParamscopies base tags into every memberseedDetachedBootstraprenders them (throughaws.LaunchTagger) into each member's uploadedspawn_tags. The orchestrator'smemberTagsalready passes every rendered tag through except the four it owns (spawn:managed,spawn:sweep-id/-name/-index), so no Lambda code changebatchQueueLaunchConfigmerges them. It is built before the region lookup, upload, key pair and IAM role, andpreflightLaunchTags(#1336) now runs on it, so a set over the 50-tag limit is refused before any AWS callspawn schedule create/ scheduler-handler--tagor--team(cobra refuses them as unknown flags), so nothing is dropped; there is a gate for thatTeam:
--teamsetsspawn:team-id, plusspawn:team-namewhen the team resolves. That is exactly what a single launch sets, on every path.Reserved prefix:
parseKVTagsrefuses aspawn:key, on every path.runLaunchnow runs that check before the identity lookup and before any dispatch, so a sweep or batch queue is refused with the single launch's error and makes no AWS call. The spawn-managed tagsbuildTagswrites still win overconfig.Tags.#1336 interaction:
preflightSweepTags(*baseConfig, ...)now counts the--tagvalues, because they are in the base config.Gates (each run red against a revert that compiles)
TestSweepMembersCarryTagAndTeamFlags: foreground members (as Launch tags them) and detached members (the uploadedspawn_tags), across two regions. Revert (droppingapplyLaunchFlagTagsfromsweepBaseConfig): 16 missing-tag failures.TestBatchQueueInstanceCarriesTagAndTeamFlags. Revert (dropping it frombatchQueueLaunchConfig): fails.TestReservedTagFlagRefusedOnEveryLaunchPath: sweep and batch configs return the single launch's error, and so doesrunLaunchon both dispatches, with 0 AWS calls (counting endpoint). Reverts: each per-path revert fails it. Removing the earlyrunLaunchcheck makes 1 AWS call per path and gives the batch queue a different error.TestBatchQueueOverTheTagLimitMakesNoAWSCall. Revert (dropping the batchpreflightLaunchTags): fails at config load, with noTagLimitError.TestScheduleCreateRefusesTagAndTeamFlags. Mutation (adding a--tagflag toschedule create): fails.lambda/sweep-orchestratorTestMemberKeepsTheCLIsTeamAndUserTagspins the pass-through of user and team tags. It has no code change to revert; the check was a mutation that addsspawn:team-idto the owned set, which makes it fail.Checks
make checksteps 1–6 pass (gofmt, vet, every GOOS, staticcheck, golangci-lint 0 issues in all 10 modules, hermetic short tests, nested modules, tidy).check-build-tagsfails, and fails the same way on unmodified main on this machine (the/private/tmppath issue).semgrep scan --config=auto --error .finds 0.make api-snapshotandmake cli-iam-actionsproduce no changes. No help text changed.Live deploy
None. The sweep-orchestrator Lambda is unchanged apart from a new test file, and no IAM changes.