What is the version of your ORAS CLI
1.0.0
What would you like to be added?
To all oras commands causing referrers update, a new flag --gc should be added to skip deleting the dangling referrers index:
- By default,
--gc is not set, dangling referrers index will not be clean
- If
--gc is set, clean dangling referrers index when needed
This flag should be added to below commands
- oras attach
- oras cp
- oras manifest push
- oras manifest delete
Why is this needed for ORAS?
Referrer index is the alternative that OCI-1.0 compliant registries can utilize to support artifact reference types, see OCI spec 1.0-rc.2.
If a referrers index i exists for a certain subject artifact a. When adding or removing referrers for a, content of i will be updated and a new referrers index will be created and retagged following the tag schema. The index i contains obsolete content without any tag referenced.
When running commands like oras attach and oras cp, it's possible that the used token scope doesn't cover delete, or the registry might disable deletion, so it's better to provide oras an option to skip cleaning the dangling referrers index.
Also checked OCI spec, cleanup is optional for registry clients.
Are you willing to submit PRs to contribute to this feature?
What is the version of your ORAS CLI
1.0.0
What would you like to be added?
To all oras commands causing referrers update, a new flag
--gcshould be added to skip deleting the dangling referrers index:--gcis not set, dangling referrers index will not be clean--gcis set, clean dangling referrers index when neededThis flag should be added to below commands
Why is this needed for ORAS?
Referrer index is the alternative that OCI-1.0 compliant registries can utilize to support artifact reference types, see OCI spec 1.0-rc.2.
If a referrers index
iexists for a certain subject artifacta. When adding or removing referrers fora, content ofiwill be updated and a new referrers index will be created and retagged following the tag schema. The indexicontains obsolete content without any tag referenced.When running commands like
oras attachandoras cp, it's possible that the used token scope doesn't cover delete, or the registry might disable deletion, so it's better to provide oras an option to skip cleaning the dangling referrers index.Also checked OCI spec, cleanup is optional for registry clients.
Are you willing to submit PRs to contribute to this feature?