You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to find the repos under the samples/ namespace
calling oras repo ls demo42.azurecr.io gives an appropriate listing
However, calling oras repo ls demo42.azurecr.io/samples gives: Error: invalid reference: invalid registry
What did you expect to happen?
list the repos under the /samples namespace. This would also be the case for something like docker that lists repos under an org namespace, although docker hub doesn't support the _catalog API :(
What if we don't provide this fuzzy listing in #634?
Forget about it, user might still assume oras ls returns a repository list even when it returns a tag list
@SteveLasker Should this feature simply do a prefix matching or strictly follow <registry>/<namespace>/<sub-namespace>/<repo> matching? e.g. should sample-test/text be included or excluded in the output?
oras repo ls $REGISTRY/samples
samples/helm/wordpress
samples/text
samples/thingthang
samples-test/text
I am asking because I didn't find any existing OCI spec for namespace.
According to Repository namespaces, Repository, and user experience of other UNIX commands like ls, sample-test/text should be excluded in the output. That is, exact match should be performed.
Being able to list the repos is a key feature. The challenge is the _catalog API was removed from the spec, and left to as reserved for registries that did implement it.
The challenge comes from different registered implementing multi-tenancy at different levels.
ACR, ECR, and some others use a domain to isolate a registry: wabbitnetworks.azurecr.io vs. acmerockets.azurecr.io
Other registered like Docker Hub and GitHub use root namespaces. docker.io/wabbitnetworks and docker.io/acmerockets
ACME Rocket users don't have permissions to Wabbit Networks. And, we shouldn't assume everything is anonymous.
See here for more details: Registry Names, Namespaces, Images, Artifacts & Tags
While I'd like to see a replacement to the _catalog API as a standard across registries, we should at least support the registries that do support _catalog, but understand the namespace issues.
This also aligns with the samples/ namespace issue here.
As for the question on inclusion/exclusion in the output, I could see it being either way.
What I'm not sure about is the pattern matching, vs. namespace mapping. Pattern matching may span multiple namespaces, where the user may not have permissions. In general, we've tried to avoid pattern matching, as it's a pandoras box that leads to REGEX matching as well.
Let me know if I need to file another issue, but I think my error is related to this one described here.
I have a Google Artifact Registry repository ARTIFACT_REGISTRY_REPO_NAME in the region REGION and project PROJECT_ID. I'm able to push my OCI artifact in this registry, if I do:
@mathieu-benoit Thanks for providing your use case with GAR for this scenario. I think it should be the same case with this issue. Could you help to confirm whether GAR supports _Catalog API for listing repositories? If YES, then it will be fixed within #768
Activity
shizhMSFT commentedon Jan 4, 2023
Thank @SteveLasker for calling this out. It is a valid scenario to list repos in a sub namespace.
@FeynmanZhou @yizha1 @qweeah This proposal may be conflict with #634. We need to pick either proposal to proceed.
qweeah commentedon Jan 4, 2023
What if we don't provide this fuzzy listing in #634?Forget about it, user might still assume
oras lsreturns a repository list even when it returns a tag listqweeah commentedon Jan 4, 2023
@SteveLasker Should this feature simply do a prefix matching or strictly follow
<registry>/<namespace>/<sub-namespace>/<repo>matching? e.g. shouldsample-test/textbe included or excluded in the output?I am asking because I didn't find any existing OCI spec for namespace.
shizhMSFT commentedon Jan 4, 2023
According to Repository namespaces, Repository, and user experience of other UNIX commands like
ls,sample-test/textshould be excluded in the output. That is, exact match should be performed.SteveLasker commentedon Jan 5, 2023
Being able to list the repos is a key feature. The challenge is the
_catalogAPI was removed from the spec, and left to as reserved for registries that did implement it.The challenge comes from different registered implementing multi-tenancy at different levels.
ACR, ECR, and some others use a domain to isolate a registry:
wabbitnetworks.azurecr.iovs.acmerockets.azurecr.ioOther registered like Docker Hub and GitHub use root namespaces.
docker.io/wabbitnetworksanddocker.io/acmerocketsACME Rocket users don't have permissions to Wabbit Networks. And, we shouldn't assume everything is anonymous.
See here for more details: Registry Names, Namespaces, Images, Artifacts & Tags
While I'd like to see a replacement to the
_catalogAPI as a standard across registries, we should at least support the registries that do support_catalog, but understand the namespace issues.This also aligns with the
samples/namespace issue here.As for the question on inclusion/exclusion in the output, I could see it being either way.
What I'm not sure about is the pattern matching, vs. namespace mapping. Pattern matching may span multiple namespaces, where the user may not have permissions. In general, we've tried to avoid pattern matching, as it's a pandoras box that leads to REGEX matching as well.
mathieu-benoit commentedon Jan 19, 2023
Let me know if I need to file another issue, but I think my error is related to this one described here.
I have a Google Artifact Registry repository
ARTIFACT_REGISTRY_REPO_NAMEin the regionREGIONand projectPROJECT_ID. I'm able to push my OCI artifact in this registry, if I do:But if I do:
oras repo ls ${REGION}-docker.pkg.dev/${PROJECT_ID}/${ARTIFACT_REGISTRY_REPO_NAME}, I will have this error:Same for
oras repo ls ${REGION}-docker.pkg.dev/${PROJECT_ID}.But
oras repo ls ${REGION}-docker.pkg.devis working, but is too broad.wangxiaoxuan273 commentedon Jan 20, 2023
I would like to work on this issue.
FeynmanZhou commentedon Jan 30, 2023
@mathieu-benoit Thanks for providing your use case with GAR for this scenario. I think it should be the same case with this issue. Could you help to confirm whether GAR supports _Catalog API for listing repositories? If YES, then it will be fixed within #768
mathieu-benoit commentedon Jan 30, 2023
Hi @FeynmanZhou, I got the confirmation that GAR supports the Catalog API. Once #768 is included in a release, I will test it then too. Thanks!