docs: track native image-registry retention as wfctl infra follow-up#412
Merged
Conversation
BMW, workflow-dnd, and core-dump each ship a per-repo .github/workflows/registry-retention.yml that calls doctl registry garbage-collection start + tag-pruning bash + actions/delete-package-versions@v5 for GHCR. That logic should live in wfctl infra so downstream consumers declare retention in infra.yaml instead of maintaining duplicate workflows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Tracks a follow-up item for lifting container image registry retention/garbage-collection into wfctl infra, so downstream repos can declare provider-agnostic retention policies in infra.yaml instead of maintaining duplicated GitHub Actions workflows.
Changes:
- Adds an out-of-scope follow-up bullet describing desired
infra.registryretention policy fields and potentialwfctl infra gc/step.registry_gcintegration.
| - Full prod in DND. | ||
| - Approval-gated promotion pattern docs and example. | ||
| - GHCR publish removal in BMW (post two clean prod deploys). | ||
| - **Native image-registry retention in `wfctl infra`.** Downstream consumers (buymywishlist, workflow-dnd, core-dump) currently run per-repo `.github/workflows/registry-retention.yml` workflows that call `doctl registry garbage-collection start` + tag-pruning bash + `actions/delete-package-versions@v5` for GHCR. This logic is duplicated across every consumer repo and re-implemented per provider. Engine work: add retention fields to `infra.registry` module schema (`retention_policy: { keep_latest: 20, untagged_ttl: 168h, schedule: "0 7 * * 0" }`), wire `wfctl infra gc` or a scheduled `step.registry_gc` that calls the provider-native GC endpoint (DO, ECR, GCR, ACR) plus tag pruning based on `keep_latest`. Downstream consumers then drop their retention workflow and declare retention in `infra.yaml`. DO's `doctl registry garbage-collection start --force --include-untagged-manifests` maps cleanly; ECR has lifecycle policies (JSON); GCR has retention policies (JSON). Schema should be provider-agnostic and delegate to plugin. |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
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.
Summary
BMW (#117), workflow-dnd (#10), and core-dump (upcoming) each ship a per-repo `.github/workflows/registry-retention.yml` that calls `doctl registry garbage-collection start` + tag-pruning bash + `actions/delete-package-versions@v5` for GHCR. That logic is duplicated across every consumer and re-implemented per cloud provider.
Adds one bullet to the out-of-scope follow-ups section of `docs/plans/2026-04-17-deploy-pipeline-multi-env-design.md` noting the engine work needed to lift retention into `wfctl infra`:
Pure tracking doc change — no code affected.
Test plan
🤖 Generated with Claude Code