Define the representation for a tag name.#256
Conversation
|
We might want to be a little more explicit around what the audience of the limitation. Clients need to know the allowed character set and maximum safe length for tags. Registries need to know the minimum length they need to support. Clients: (1,128] Registries: [128,Inf) So... in order for clients to be able to use at most 128 characters, registries should support at least 128 characters. We could also sidestep some of these questions with something like: |
mikebrow
left a comment
There was a problem hiding this comment.
see comment regarding tag name as a term.
Signed-off-by: Brian de Alwis <bdealwis@google.com>
|
Oops sorry: these comments ended up in my hidden in my personal email. @jonjohnsonjr I'm a bit hesitant:
|
If registries don't support at least 128 characters in a tag, then they will be "broken" from the perspective of a client that expects to be able to use up to 128 characters. It's basically Postel's Law: clients need to be conservative in what they do, and registries should be liberal in what they accept. Is that a good idea? Who knows. The bare minimum, IMO, is that registries should support up to 128 characters. Given that clients are probably not prepared to deal with tags longer than 128 characters, maybe registries should also not support longer tags than that, but it seems a little bit limiting... |
|
LGTM but I'm not a maintainer :) |
waynr
left a comment
There was a problem hiding this comment.
Looks good to me since it answers a question I brought up in slack. Not sure if I'm a maintainer on this project though -- probably not.
|
@briandealwis your commit are missing DCO signature |
Co-authored-by: João Pereira <484633+joaodrp@users.noreply.github.com> Signed-off-by: Brian de Alwis <bdealwis@google.com>
|
Added a sign-off. |
|
jzelinskie
left a comment
There was a problem hiding this comment.
Looks really good in terms of keeping things surgical.
A tag is defined in the spec as a manifest identifier, but the spec does not define the acceptable representations for a tag. This PR provides a definition for the tag name based on the historical description from
docker tag.There was no reference to definitions for regular expressions, and other examples used basic regexs, so I didn't use character classes or bounds limits.
Motivated by #52