Repository navigation
feat(sweep): carry --no-public-ip on a detached sweep (#1437) - #1467
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
scttfrdmn
force-pushed
the
feat/1437-detached-no-public-ip
branch
from
October 31, 2026 19:49
5473129 to
91f3cfe
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 #1437
A detached sweep can now use
--no-public-ip. Before, it was refused there (#1433).Design
--detach, in the CLI, with the caller's credentials.seedDetachedBootstrapcallsdetachedBootstrap.privateNetOffor everyNoPublicIPmember. In production that isaws.Client.PreflightNoPublicIP, through the samepreflightNoPublicIPForseam the foreground paths use, wired inlaunchSweepDetachedonly. It runs after the member's target OS is known and before its launch settings are rendered, so each member is checked in its own region/AZ (a row'sazincluded). With only an AZ, the subnet that was checked is pinned inSubnetID. A failing subnet refuses the detach before anything is uploaded or created, unless--allow-missing-endpoints. Repeat checks are cached per (region, subnet).detachedSettingsGuardno longer refuses--no-public-ip. It callsLaunchConfig.ValidateNoPublicIP(), so the foreground refusals apply here too: no subnet or AZ, a row'sdns, a custom DNS target, and--allow-missing-endpointswithout--no-public-ip. Multi-card--efais still refused (single interface only).aws.LaunchSettings.NoPublicIP(no_public_ip,omitempty).applyNoPublicIPmoved intoapplyLaunchSettings, soClient.LaunchandLaunchSettings.Apply(the orchestrator) build the no-public-IP interface with the same code.Applyrefusesno_public_ipwith nosubnet_id(the CLI never writes that). The orchestrator makes no Elastic IP calls, and a gate now holds that.no_public_ipand the pinned subnet. The foreground resume record already round-tripsNoPublicIP/AllowMissingEndpoints.Stale-orchestrator safety
No schema bump. Every orchestrator since v0.147.0 (#1353) decodes settings with
DisallowUnknownFields, so a v0.147.0 to v0.152.0 orchestrator refuses a--no-public-ipmember ("a field this build cannot apply") instead of launching it with a public IP. That is a non-capacity error, so the member fails without being launched. Settings without the flag omit the field and still decode on older orchestrators. A schema bump would have broken every detached sweep in both directions of skew, including the params already in S3 for running sweeps and schedules, because the decoder requires an exact schema match. TheLaunchSettingsSchemacomment now states this policy. Pre-v0.147.0 orchestrators ignorespawn_launch_settingsentirely. They were already unsupported for the same reason (#1353's CHANGELOG says to deploy the orchestrator first).Gates (each watched failing against a compiling revert)
TestDetachedNoPublicIPChecksEveryMembersSubnet(cmd)TestPrivateMemberLaunchesWithNoPublicIP,TestOrchestratorNeverManagesElasticIPs(lambda/sweep-orchestrator)TestOlderOrchestratorRefusesSettingsItCannotApply(pkg/aws): decodes this build's settings through the real decoder into the v0.147.0 to v0.152.0 struct shapeTestDetachedMemberRunInstancesIsTheForegroundMembersnow coversNoPublicIPTestDetachedResumeRelaunchesFromParamsCarryingEveryFlagnow runs--no-public-ip(it was skipped before)IAM inventory
docs/reference/cli-iam-actions.mdnow listsec2:DescribeRouteTables,ec2:DescribeVpcEndpoints,ec2:DescribeSubnetsandec2:DescribeVpcsunderspawn schedule create. This is the documented over-approximation: the call graph resolves the bootstrap's func field across both callers. The schedule path never sets the check and never hasNoPublicIP.spawn launchalready listed all four.Deploy
make deploy-checklist FROM=v0.152.0 TO=HEAD: sweep-orchestrator and pipeline-orchestrator are code-only. Deploy the sweep-orchestrator before users rely on the CLI side. Until then,--no-public-ipdetached members are refused, never launched with a public IP.