Repository navigation
feat: --tag on snapshot create + launch; propagate snapshot tags to volumes (#161) - #162
Merged
Merged
Conversation
…olumes (#161) - `spawn snapshot create --tag k=v` (repeatable) sets custom provenance tags at creation, merged UNDER the spawn:* baseline (can't override it). - `spawn launch --tag k=v` (repeatable) tags the instance + its created volumes; config.Tags → buildTags plumbing already existed, just unexposed. spawn-managed tags take precedence over user tags. - --attach-volume propagates the source snapshot's CUSTOM tags onto the created volume (skips Name + spawn:* so the volume isn't stamped with the snapshot's identity) plus spawn:from-snapshot=<id>. RunInstances tags all volumes uniformly, so this is a best-effort post-launch CreateTags keyed by device, never fatal to the launch. Shared parseKVTags helper (reserves the spawn: prefix); propagatableSnapshotTags filter extracted + unit-tested. Docs: reference-data-volumes guide gains a provenance-tags section.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Closes #161. Custom provenance tags for reference-data snapshots and ephemeral spores.
What
All three parts of the request:
spawn snapshot create --tag key=value(repeatable) — custom tags on the snapshot at creation, merged with thespawn:*baseline. No more post-hocaws ec2 create-tags.spawn launch --tag key=value(repeatable) — tags the instance and its created volumes. Theconfig.Tags → buildTagsplumbing already existed; there just was no flag. (Confirmedlaunchhad no--tagtoday.)--attach-volumetag propagation — the volume created from a snapshot inherits the snapshot's custom tags +spawn:from-snapshot=<id>, so it's traceable to its source DB.Design choices
--tagvalues merge under spawn-managed tags — a user can't clobberspawn:managed, team/strata tags, etc.parseKVTagsrejects the reservedspawn:prefix outright.CreateTagskeyed by device name (AttachDeviceName(i)), never fatal to the launch. The filter (propagatableSnapshotTags) deliberately skips the snapshot'sNameandspawn:*baseline — otherwise every spore's data volume would be stampedName=kraken2-…, confusing Cost Explorer / cleanup. It addsspawn:from-snapshot=<snap-id>for traceability.Tests
parseKVTags: key=value, value-with-=, nil/empty, and rejects bad forms (no=, empty key, reservedspawn:prefix).propagatableSnapshotTags: custom tags propagate;Name+spawn:*don't.make checkgreen. No new top-level command, so the Tier 0 coverage gate is unaffected.Docs: reference-data-volumes guide gains a Provenance tags section + a note that attached volumes inherit the snapshot's custom tags.