oras icon indicating copy to clipboard operation
oras copied to clipboard

if an artifact cannot be pulled by `oras pull`, recommend oras user to use dedicated tool

Open qweeah opened this issue 2 years ago • 0 comments

What is the version of your ORAS CLI

main branch build from 92f9c8b712f6f69bb6a2b07c30d44b7764f8b6e7

What would you like to be added?

Taking Helm chart artifacts as an example, the chart files are archived into a Tarball file and added as a layer. Since the file name is not stored into the org.opencontainers.image.ref.name annotation, oras pull will skip the unnamed layer and ORAS users cannot use oras pull to pull a Helm chart artifact.

E.g. If we use oras pull to pull a Helm chart artifact, the output will be

✗ oras pull jinzha1.azurecr.io/helm/azure-arc-k8sagents:0.1.1844-mz
✓ Skipped     application/vnd.cncf.helm.chart.content.v1.tar+gzip                         24.9/24.9 kB 100.00%     0s  
└─ sha256:ffaa0b3df619409f2a391b773ddac01415a7622bc4635e331527ef9011514116
✓ Skipped     application/vnd.cncf.helm.config.v1+json                                      319/319  B 100.00%     0s  
└─ sha256:b2eb9186e71afc45b00067073bdb69230fc5d82c1b0c8f78691bfa29ca026d1b
✓ Pulled      application/vnd.oci.image.manifest.v1+json                                    831/831  B 100.00%     0s  
└─ sha256:78fbfbb0dd2e13c84868d61efb4dc6ee1896e321c22d09e0bb65bab59bb3e4f8
Skipped pulling layers without file name in "org.opencontainers.image.title"
Use 'oras copy jinzha1.azurecr.io/helm/azure-arc-k8sagents:0.1.1844-mz --to-oci-layout <layout-dir>' to pull all layers.

The suggestion Use 'oras copy jinzha1.azurecr.io/helm/azure-arc-k8sagents:0.1.1844-mz --to-oci-layout <layout-dir>' to pull all layers. does not provide much help for Helm charts. Even though ORAS user can use it to download the artifact into a local OCI layout folder, it's still not presented as folder containing files and hard to be used directly by common users.

If the config exists with mediaType as application/vnd.cncf.helm.config.v1+json, the suggestion should be changed to recommend using helm pull.

Why is this needed for ORAS?

It will help user find the right tool to pull the artifact if it's not supported by ORAS.

Are you willing to submit PRs to contribute to this feature?

  • [ ] Yes, I am willing to implement it.

qweeah avatar Nov 07 '23 04:11 qweeah