You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tag everything spawn creates spore-host:managed-by=spawn (incl. the spored policies) #1652
Part of the Leave-no-trace epic spore-host/spore-host#752. Design: every spore.host tool removes what it created once nothing it manages is active, after a 24 h grace. The rollout is report mode first, then reap. The boundary spore-host/spawn-instance-boundary is the only permanent piece. Account trust boundary: nothing in a spore.host account may reach 942542972736, so cleanup there is in-account only.
Add the libs/tags keys alongside spawn:managed.
The /spore-host/spored-* policies and the ISO-import role are untagged today; tag them.
Enable the untagged-create detector in unit tests.
From calque#227 (spore-host/calque#233): a constraint for this issue's instance tags.
calque launches its instances through pkg/aws.Launch and passes spore-host:managed-by=calque (plus the rest of the libs/tags set) in LaunchConfig.Tags. calque owns those instances' lifecycle: it terminates them, drains its fleets and deletes its pools. So calque is the right managed-by for them, and calque#228's cleanup will look for that value.
In v0.131.0, buildTags (pkg/aws/tags.go) appends caller tags in Section 7 with appendTagUnique, and the first occurrence of a key wins. I checked this with a throwaway test against the v0.131.0 source: a caller spawn:managed=false is dropped, and a caller spore-host:managed-by=calque survives, only because spawn writes no spore-host:* key itself today.
If this issue adds spore-host:managed-by=spawn in sections 1 to 6, every calque (and lagotto snipe?) instance will be silently re-labelled spawn. spawn's idle teardown would then count them as its own, and calque's would miss them. Suggest one of:
write spawn's spore-host:* keys only when the caller didn't supply them (for example, add them after Section 7 with appendTagUnique); or
add a LaunchConfig.ManagedBy tags.Tool field, defaulting to spawn.
Same for buildIAMTags. It mutates the caller's IAMRoleConfig.Tags map and sets keys unconditionally. calque re-applies its tags with TagRole after CreateOrGetInstanceProfile, so roles self-correct, but a "don't overwrite a caller's spore-host:managed-by" rule there would avoid the round trip.
TTL enforcement should keep keying on the spawn:* lifecycle tags, not on managed-by. calque's instances still rely on spawn's TTL backstop.
Activity
scttfrdmn commentedon Nov 16, 2026
From calque#227 (spore-host/calque#233): a constraint for this issue's instance tags.
calque launches its instances through
pkg/aws.Launchand passesspore-host:managed-by=calque(plus the rest of the libs/tags set) inLaunchConfig.Tags. calque owns those instances' lifecycle: it terminates them, drains its fleets and deletes its pools. Socalqueis the rightmanaged-byfor them, and calque#228's cleanup will look for that value.In v0.131.0,
buildTags(pkg/aws/tags.go) appends caller tags in Section 7 withappendTagUnique, and the first occurrence of a key wins. I checked this with a throwaway test against the v0.131.0 source: a callerspawn:managed=falseis dropped, and a callerspore-host:managed-by=calquesurvives, only because spawn writes nospore-host:*key itself today.If this issue adds
spore-host:managed-by=spawnin sections 1 to 6, every calque (and lagotto snipe?) instance will be silently re-labelledspawn. spawn's idle teardown would then count them as its own, and calque's would miss them. Suggest one of:spore-host:*keys only when the caller didn't supply them (for example, add them after Section 7 withappendTagUnique); orLaunchConfig.ManagedBy tags.Toolfield, defaulting tospawn.Same for
buildIAMTags. It mutates the caller'sIAMRoleConfig.Tagsmap and sets keys unconditionally. calque re-applies its tags with TagRole afterCreateOrGetInstanceProfile, so roles self-correct, but a "don't overwrite a caller'sspore-host:managed-by" rule there would avoid the round trip.TTL enforcement should keep keying on the
spawn:*lifecycle tags, not onmanaged-by. calque's instances still rely on spawn's TTL backstop.