-
Notifications
You must be signed in to change notification settings - Fork 211
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
Add + as a valid tag character #154
Comments
Sorry, could you point to where in the spec.md right now the supported tags are enumerated? I took a quic klook but did not find it. |
I don’t believe it’s defined at all. I’m hoping that this issue will track the inclusion of the tag specification, and that it should allow for semver strings. |
This is a good point, but maybe the title is a bit misleading - what you're really asking is that tags support the "+" character, right? |
Yes and no. Lack of support for the This issue is really two fold
Right now since there is no specification, nothing is preventing an implementation that lacks support for |
I guess a better title would be “define a specification for tags” I’ll make it so |
To gather more context, the image spec does talk a little about tags. In particular note that https://github.com/opencontainers/image-spec/blob/e562b04403929d582d449ae5386ff79dd7961a11/image-layout.md#indexjson-file mentions
The description for this annotation is intriguing:
https://github.com/opencontainers/image-spec/blob/master/annotations.md I don't really follow the intent of this at all. It seems to be representing the full image name, including repo, rather than just the "tag" as it allows "components" and the ':' character. This more or less contradicts the first link. And it gets even stranger if you consider that "middle" components can validly contain things like ":" e.g. |
@JeremyLoy the original issue was stalled not on politics, but rather a full assessment done on the impact and a recommendation for how to change the spec. It is related to |
It'd be good to see if we could get an effort to support The regex today is:
|
As a maintainer, I give this a huge +1. The vast majority of folks are using tags for versions of their software and semver is quite common. Not being able to satisfy that is a huge failure of the standard, IMO. What would it take to kick the tires here? I think it needs some eyeballs from the folks working on the runtime. |
We probably need eyes from around the whole ecosystem, right? I imagine the original distribution regex for this has been cargo culted into a number of places. 😬 (Maybe from the spec perspective this ends up with the current regex defined as MUST and |
As supporting |
I missed the Listing tags API. It can take a tag name as a query param, which would need percent-encoding to avoid being interpreted as a space. I do wonder about backward compatibility on this API. If a registry starts returning tag values that are invalid for existing clients then bad things might happen. For instance, imagine a script that gets all tags in a registry and then iterates through them running Docker commands. The tag with a + in it would cause Docker to fail and the script to potentially abort. Another option is to rev the API version so that v2 list omits any tags with |
I'm hesitant on this because it doesn't feel like there's enough new functionality to warrant a breaking change. In particular, this would still be pushing the same image content, just a slightly different name.
There's no way to know that all the tools receiving a specific tag are on the latest OCI spec. So something like a runtime or vulnerability scanner may not be able to pull images with the Users can insist on having OCI vn.n.n support in their tooling. However, there's no conformance test for client tooling, only registry servers. And downstream consumers may be different organizations from the producers, e.g. an open source developer that has no visibility into who is pulling their images and how they are running them. |
I would hope that security critical tools like this wouldn't fail open, but I think it's a valid point that there's not a good way to move forward starting at the spec. This should probably be tagged in a v2 milestone because it's a breaking change and something we don't want to forget once we commit to start breaking. |
Done. |
The OCI specification lacks a strict definition of valid tags.
I believe that image tags should support the full semver specification. To be clear, I am not saying all tags must be valid semver, I am merely stating that a valid semver should also be a valid tag.
There are some technical limitations on the Docker/Moby side, as the
+
character is not allowed. Hopefully ratifying the addition (upstream? downstream? not exactly sure of the politics here) will spur this along. The issue has been open for 5 years with no progress.https://semver.org
distribution/distribution#1201
distribution/distribution#1202 (comment)
The text was updated successfully, but these errors were encountered: