Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide enforcing tags for bundles #101

Open
radu-matei opened this issue Mar 12, 2020 · 1 comment
Open

Decide enforcing tags for bundles #101

radu-matei opened this issue Mar 12, 2020 · 1 comment

Comments

@radu-matei
Copy link
Member

radu-matei commented Mar 12, 2020

The current behaviour of cnab-to-oci is to allow pushing to a repository without a tag:

$ cnab-to-oci push testdata/cnab/bundle.json --target localhost:5000/no-tag-test
Starting to copy image cnab/helloworld:0.1.1...
Completed image cnab/helloworld:0.1.1 copy
Pushed successfully, with digest "sha256:b4936e42304c184bafc9b06dde9ea1f979129e09a021a8f40abc07f736de9268"

$ cnab-to-oci pull localhost:5000/no-tag-test                                   
Error: failed to resolve bundle manifest "localhost:5000/no-tag-test": object required

$ cnab-to-oci pull localhost:5000/no-tag-test@sha256:b4936e42304c184bafc9b06dde9ea1f979129e09a021a8f40abc07f736de9268

If a bundle is pushed without a tag, pulling it has to be performed using the full SHA256 digest, which is unknown to a potential consumer of the bundle.
Should we enforce pushing with a specific tag? (Or at least by default?)

Note that this is also significant in the context of signing.

@carolynvs
Copy link
Collaborator

I would hazard a guess that 99% of the time, someone who did this either a) assumed that it would use latest as the tag because they aren't familiar with the tool and hope it works like docker or b) made a mistake and didn't want it to push an untagged bundle.

If we do need to keep this behavior around, I suggest it is put behind a flag for people who explicitly want it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants