Open rogpeppe opened 9 months ago
For the record, this does not apply to self-managed Gitlab installations, because they apparently do not use the new container registry (yet).
These are the custom media types currently used by internal/mod/modregistry
package:
application/vnd.cue.module.v1+json
- the artifact type for the top level module manifestapplication/vnd.cue.modulefile.v1
- the artifact type for the module file blob within the aboveThe gitlab registry only has an issue with the former: it seems to ignore unusual blob media types.
Some documentation on how to construct a custom media type: https://datatracker.ietf.org/doc/html/rfc6838#section-3.2 More naming requirements here: https://datatracker.ietf.org/doc/html/rfc6838#section-4.2
The list of currently assigned IANA media types is here: https://www.iana.org/assignments/media-types/media-types.xhtml
Some instructions for registering a new media type are here: https://www.w3.org/2020/01/registering-mediatypes
Here is a previous Gitlab PR that added support for a new media type (application/vnd.ansible.collection
): https://gitlab.com/gitlab-org/container-registry/-/merge_requests/1063
Per our discussion offline, here is a summary of the proposed plan:
application/vnd.cue.module.v1+json
application/vnd.cue.modulefile.v1
In the worst case, we get pushback/feedback from IANA on our choice of media type. In which case we can revisit. Hence we should try and flush out issues there ASAP.
But the most important thing for GitLab users is to get things unblocked.
But the most important thing for GitLab users is to get things unblocked.
@rogpeppe raised https://gitlab.com/gitlab-org/container-registry/-/issues/1203, which was then resolved by the now-merged https://gitlab.com/gitlab-org/container-registry/-/merge_requests/1588. We will update in this issue as we learn about the availability of that fix via GitLab "products".
According to a reply to the above-mentioned issue, the fix should be released with GitLab 16.10, due out 2024-03-21.
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
N/A (feature didn't exist in latest stable)
What did you do?
What did you expect to see?
A passing test
What did you see instead?
It turns out that gitlab does not support arbitrary media types. See https://gitlab.com/gitlab-org/container-registry/-/issues/973.
If the
internal/modregistry
code is changed to use a simpleapplication/json
type for the artifact type, the test above succeeds.TODO