oras icon indicating copy to clipboard operation
oras copied to clipboard

`oras tag` should not create referrers tags

Open qweeah opened this issue 1 year ago • 1 comments

Although tagging a referrer artifact manifest is discouraged, it is still doable. However, re-tagging is implemented as pushing the exact manifest again to the remote server. According to the distribution-spec, if the remote server does not support referrers API, it will go for the referrers tag schema case. However, it is not necessary since the manifest is already there, we are just adding a new tag not really pushing a new manifest.

In summary, tagging a referrers manifest should never go for the tag schema even if the server does not support referrers API since the referrer manifest is already there on the server.

Originally posted by @shizhMSFT in https://github.com/oras-project/oras/issues/1435#issuecomment-2197136662

qweeah avatar Jun 28 '24 15:06 qweeah

BTW this bug generates unwanted referrer tags (256-xxx) ONLY in registries that haven't implemented OCI Distribution Spec v1.1.0.

qweeah avatar Jul 01 '24 01:07 qweeah

@njucjc Can you help confirm if this has met your expectation described in #1435? You may build from main branch or use ghcr.io/oras-project/oras:main. Thanks in adavnce.

qweeah avatar Jul 10 '24 01:07 qweeah

@njucjc Can you help confirm if this has met your expectation described in #1435? You may build from main branch or use ghcr.io/oras-project/oras:main. Thanks in adavnce.

@qweeah I already try it out, It works

njucjc avatar Jul 11 '24 02:07 njucjc

Closing as it's resolved.

qweeah avatar Jul 11 '24 03:07 qweeah