Skip to content

fix(store): stop tagging referrers with their CID - #2108

Merged
tkircsi merged 3 commits into
mainfrom
feat/digest-based-referrer-delete
Sep 3, 2026
Merged

tkircsi merged 3 commits into
mainfrom
feat/digest-based-referrer-delete

Conversation

@tkircsi

@tkircsi tkircsi commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Closes #2102

Referrers are no longer tagged with their CID. Deletion now works from the manifest descriptor, which is the only thing those tags were needed for.

Also fixes two findings from the #2095 review: superseded scan reports are removed in one batched call instead of one full referrer walk per report, and the prune checks the referrer type itself, since the store's type filter passes every custom type.

Verified against a local Zot with deleteUntagged and deleteReferrers on: signing adds 0 tags and 2 untagged referrers, pull --signature/--public-key/--scan-report and verify all work, and an untagged referrer whose subject is alive survives a GC pass.

Made with Cursor

@tkircsi
tkircsi requested a review from a team as a code owner September 3, 2026 16:30
@github-actions github-actions Bot added the size/M Denotes a PR that changes 200-999 lines label Sep 3, 2026
@tkircsi
tkircsi force-pushed the feat/digest-based-referrer-delete branch from fa405e8 to 8e4cf53 Compare September 3, 2026 16:31
// Referrers are stored in the same repository as their subject record and are
// tagged with their own CID, so a tag parsing as a CID does not make it a
// record. Referrer manifests are identified by the OCI subject field that links
// Referrers are stored in the same repository as their subject record. New ones are not tagged,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is obscure. New in what sense and earlier in what sense ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change, doesn't remove the already tagged referrers tags, but does not create tags for new ones.

@tkircsi tkircsi Sep 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not an existing data cleanup PR.

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.05263% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/store/oci/internal.go 37.5% 15 Missing ⚠️
server/store/eventswrap/eventswrap.go 0.0% 4 Missing ⚠️
server/store/oci/referrers.go 91.9% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@muscariello muscariello left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tkircsi
tkircsi merged commit d21d853 into main Sep 3, 2026
33 checks passed
@tkircsi
tkircsi deleted the feat/digest-based-referrer-delete branch September 3, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 200-999 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor]: Stop CID-tagging referrers (90% of tags) — requires digest-based DeleteReferrer first

2 participants