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

Changed namespace, but version tags still appear in original namespace #147

Open
DentonGentry opened this issue Feb 26, 2023 · 1 comment

Comments

@DentonGentry
Copy link

I published the first several versions of our devcontainer feature without setting features-namespace or templates-namespace, so they appeared at a default location based on the name of the repository:
https://github.com/tailscale/codespace/pkgs/container/codespace%2Ftailscale

I've since updated our workflow to set the namespaces, but new version tags still only appear at the original location.

For example I ran the devcontainers/action workflow for 1.0.3 after updating features-namespace and templates-namespace, but the 1.0.3 tag only appears in the old package location:
https://github.com/tailscale/codespace/pkgs/container/codespace%2Ftailscale

The new location, the one that I actually want to publish to, only gets the latest tag.
https://github.com/tailscale/codespace/pkgs/container/codespace

Therefore the prior versions drop out of its view when a new one it published, and it isn't possible for people to reference the devcontainer feature by a specific version.

What I'd like to accomplish is:

Is there a way to accomplish this?

References: devcontainers/devcontainers.github.io#127

@samruddhikhandale
Copy link
Member

Hi 👋

Looks like there is some kind of confusion in how the namespace works and how it's perceived in this case. I wonder if that's because the name of the owner & Feature is same (ie tailscale). Even I was confused for a bit while reviewing devcontainers/devcontainers.github.io#119

According to https://containers.dev/implementors/features-distribution/#oci-registry, by default, the namespace is <owner>/<repo> (in your case it is tailscale/codespace).

I published the first several versions of our devcontainer feature without setting features-namespace or templates-namespace, so they appeared at a default location based on the name of the repository:

As nothing was set, by default the features-namespace and templates-namespace was tailscale/codespace (ie <owner>/<repo>)

I've since updated our workflow to set the namespaces, but new version tags still only appear at the original location.

image

Apparently, the updated namespace is still the same as the default one. Hence, nothing is expected to change.

stop adding new versions in https://github.com/tailscale/codespace/pkgs/container/codespace%2Ftailscale, but leave it in place so as not to break people who are already referencing it

ghcr.io/tailscale/codespace/tailscale

The Feature tailscale is always pushed as ${REGISTRY}/${NAMESPACE}/${FEATURE}. Hence, https://github.com/tailscale/codespace/pkgs/container/codespace%2Ftailscale is correct with the current workflow.

REGISTRY - ghcr.io
NAMESPACE - tailscale/codespace
FEATURE - tailscale

new versions appear only in https://github.com/tailscale/codespace/pkgs/container/codespace, with their tags

As mentioned in https://containers.dev/implementors/features-distribution/#oci-registry 👇

The auto-generated devcontainer-collection.json is pushed to the registry with the same namespace as above and no accompanying feature name. The collection file is always tagged as latest.

https://github.com/tailscale/codespace/pkgs/container/codespace is an OCI artifact which contains metadata of Features/Templates. This is how Features/Templates metadata are distributed and is part of the spec.

Let us know if you have any other questions. Feel free to take a look at the Features spec for more details.

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