Skip to content

feat(oci): prune stale image delta tags - #177

Merged
abn merged 1 commit into
mainfrom
feat/image-deltas-prune
Oct 23, 2026
Merged

abn merged 1 commit into
mainfrom
feat/image-deltas-prune

Conversation

@abn

@abn abn commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Adds aetherpak deltas prune, a serialized maintenance command for the delta tag set. Stacked on #174.

What changed

  • Removes _delta-* tags whose target image returns a definitive 404, confirmed with two probes.
  • Removes _deltasrc-* tags that no surviving delta or application tag references, plus dangling source tags.
  • Rebuilds _deltaindex strictly from the surviving tags and refreshes every descriptor.
  • --dry-run reports candidates without deleting. --output-file emits delta-tags, source-tags, and index-rebuilt.
  • Per-tag delete failures are collected and the index rebuild still runs. Auth, network, and other transient probe errors leave tags untouched.
  • A source tag must resolve to the digest encoded in its name before it can be deleted.

Behavior

  • Run it after a release as a serialized step with registry write credentials. --dry-run needs read access only.
  • The rebuild drops index entries not backed by a _delta-* tag, including foreign entries.
  • It is not wired into parallel push jobs.

Validation

  • Tests cover removing a pre-seeded index entry, keeping live tags, removing an unreferenced source tag, and dry-run.
  • A dry run against the public staging registry reported zero removals while the chain was intact.
  • go test -race ./..., go vet, pre-commit, and integration pass.

Notes

  • Action integration is a follow-up.

@abn
abn added this pull request to stack #175 October 23, 2026 21:03
@abn
abn added this pull request to the merge queue Oct 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Oct 23, 2026
@abn
abn force-pushed the feat/image-deltas-prune branch from 3473fc7 to b36c18c Compare October 23, 2026 21:10
@abn
abn added this pull request to the merge queue Oct 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 23, 2026
Base automatically changed from feat/image-deltas-history to main October 23, 2026 21:41
@abn
abn force-pushed the feat/image-deltas-prune branch from b36c18c to c6b5a3e Compare October 23, 2026 21:41
@abn
abn added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit bdfb644 Oct 23, 2026
6 checks passed
@abn
abn deleted the feat/image-deltas-prune branch October 23, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant