oras icon indicating copy to clipboard operation
oras copied to clipboard

Multiple tags at the once

Open mbaykara opened this issue 3 years ago • 11 comments

I did not find either in the documentation of oras or somewhere else. Is there any multi-tagging support? i.e:

oras push myregistry/artifact:a,b,c then in my registry following artifacs are available:

myregistry/artifact:a
myregistry/artifact:b
myregistry/artifact:c

I know I can make for each tag a oras push but the feature might be already there.

mbaykara avatar Feb 24 '22 13:02 mbaykara

Instead of pushing mutiple tags at once, it makes more sense if we have something like oras tag. /cc @qweeah

shizhMSFT avatar Mar 04 '22 09:03 shizhMSFT

I mean, the way of how other tools like ko, jib works is more convinced to me. It does not require an extra command to append it.

myregistry/artifact:tag1,tag2,tag3

Currently, I don't see how the oras tag makes more sense. Could you explain more? @shizhMSFT

mbaykara avatar Mar 04 '22 09:03 mbaykara

If it is just for oras push scenario, it seems a better UX. Since a comma , is not a valid symbol in a tag name [\w][\w.-]{0,127}, we can add it as a seperator for oras push the next iteration of oras development.

shizhMSFT avatar Mar 04 '22 10:03 shizhMSFT

Look forward to this feature!

mbaykara avatar Mar 04 '22 10:03 mbaykara

/cc @FeynmanZhou @yizha1 for UX comments.

shizhMSFT avatar Jul 26 '22 13:07 shizhMSFT

AFAIK, when I try to push an artifact with multiple tags then I have to push one by one i.e

oras push ${OCI_REGISTRY}/${OCI_REPOSITORY}:${TAG1}
oras push ${OCI_REGISTRY}/${OCI_REPOSITORY}:${TAG2}
oras push ${OCI_REGISTRY}/${OCI_REPOSITORY}:${TAG3}

which requires multiple API calls. But instead if can push as follow:

oras push ${OCI_REGISTRY}/${OCI_REPOSITORY} --tags=`${TAG1},${TAG2},${TAG3}

or something similar. /cc @FeynmanZhou

mbaykara avatar Aug 30 '22 10:08 mbaykara

@mbaykara Thanks for your clarification! It makes sense, I think this scenario could be supported in ORAS 0.15.

FeynmanZhou avatar Aug 30 '22 13:08 FeynmanZhou

@jwang1013 Could you help this issue?

shizhMSFT avatar Aug 31 '22 07:08 shizhMSFT

I will take on this item.

wju-MSFT avatar Aug 31 '22 07:08 wju-MSFT

I thought we already supported passing -t multiple times, but I was confusing it with az acr build. What about supporting additional -t

oras push ${OCI_REGISTRY}/${OCI_REPOSITORY}:v1 \  
  -t ${OCI_REGISTRY}/${OCI_REPOSITORY}:v1.1 \  
  -t latest

I've allowed for including/excluding the full path to enable simplicty of just adding additional tags, similar to @mbaykara suggestion, but without breaking up the original reference.

SteveLasker avatar Sep 02 '22 15:09 SteveLasker

I thought we already supported passing -t multiple times, but I was confusing it with az acr build. What about supporting additional -t

oras push ${OCI_REGISTRY}/${OCI_REPOSITORY}:v1 \  
  -t ${OCI_REGISTRY}/${OCI_REPOSITORY}:v1.1 \  
  -t latest

I've allowed for including/excluding the full path to enable simplicty of just adding additional tags, similar to @mbaykara suggestion, but without breaking up the original reference.

Using -t seems inconsistent in UX. If we want to make it consistent, it will be

oras push -t ${OCI_REGISTRY}/${OCI_REPOSITORY}:v1 \  
  -t ${OCI_REGISTRY}/${OCI_REPOSITORY}:v1.1 \  
  -t latest

However, it is still weird. Therefore, I think the original proposal makes more sense.

shizhMSFT avatar Sep 20 '22 05:09 shizhMSFT