Skip to content

Add staging-cleanup and exercise it on the test packages - #10

Open
alexadereyko wants to merge 4 commits into
jira/TBBAS-3297-stage-facadefrom
jira/TBBAS-3293-staging-cleanup
Open

Add staging-cleanup and exercise it on the test packages#10
alexadereyko wants to merge 4 commits into
jira/TBBAS-3297-stage-facadefrom
jira/TBBAS-3293-staging-cleanup

Conversation

@alexadereyko

Copy link
Copy Markdown
Collaborator

Depends on:

Adds staging-cleanup (reusable) — prunes indexes older than a per-path retention window, through the index. test-cleanup exercises it on the throwaway test/* packages, starting as a dry-run.

@alexadereyko
alexadereyko force-pushed the jira/TBBAS-3293-staging-cleanup branch 4 times, most recently from e9a6728 to b442d34 Compare July 23, 2026 13:14
@alexadereyko
alexadereyko force-pushed the jira/TBBAS-3297-stage-facade branch from 6b9b93d to 3d392c2 Compare July 23, 2026 16:29
staging-cleanup is a reusable workflow that prunes aged staging packages: for
each caller path, any index older than its retention window is removed through
the index -- fetch it, delete its children by digest, then the index. It never
deletes untagged versions, since the live children are untagged too. A repo
points it at the paths it owns (e.g. its nightly channel) on a schedule.

test-cleanup runs it against the throwaway test/* packages, starting as a
dry-run.
Add org.opencontainers.image.created to the index annotations so a
consumer can read each staging's age straight from the registry.
Find EOL enumerates each package's indexes with oras and reads their
age from the org.opencontainers.image.created annotation, emitting the
end-of-life digests (each stale index's children, then the index).
Prune (ghcr) resolves those digests to GitHub Packages versions and
deletes them over REST, since ghcr has no OCI manifest delete. Reading
is registry-agnostic; only the prune step and the up-front guard are
ghcr-specific. Retention sums days + hours + minutes + seconds.

Exercise it end to end: publish real artifacts through staging-push,
prune them with a 1-second retention, and assert the path is empty.
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