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

Option? to ignore semver metadata after _ #2387

Open
pefeigl opened this issue Jul 29, 2024 · 5 comments
Open

Option? to ignore semver metadata after _ #2387

pefeigl opened this issue Jul 29, 2024 · 5 comments
Labels
kind/feature A request for, or a PR adding, new functionality stale-issue

Comments

@pefeigl
Copy link

pefeigl commented Jul 29, 2024

Hello!

We're trying to skopeo sync oci artifacts for use with helm. They are versioned according to semver, but also contain metadata (after the + character, which helm changes to an underscore _, see https://helm.sh/docs/chart_best_practices/conventions/#version-numbers). We've tried to use skopeo sync in combination with images-by-semver: to copy these, but skopeo does not actually find the version numbers that contain metadata after a _.

Is there any way to make this work, or will we need to remove the metadata from the semver version?

Thanks for any help with this, greetings,
Peter

@pefeigl pefeigl changed the title semver metadata semver metadata after +/_ not ignored Jul 29, 2024
@mtrmac
Copy link
Contributor

mtrmac commented Jul 29, 2024

Thanks for reaching out.

Without an example label I’m just guessing; but the spec says +, not _; https://semver.org does not contain a _ character at all. So I’d expect values with _ are not recognized, and at least right now there is no option for them to be.

@fuero
Copy link

fuero commented Jul 30, 2024

It's about Helm's peculiarity of replacing + with _ when dealing with charts:

https://helm.sh/docs/chart_best_practices/conventions/#version-numbers

The text in the source I provided is a little misleading, Helm will also act on the replacement when pushing or pulling.

So in short, Helm treats + and _ the same leaving other tools to pick up where it muddles the spec.

@pefeigl
Copy link
Author

pefeigl commented Jul 30, 2024

I think fuero is refering to the source examples in this issue: renovatebot/renovate#29764

@pefeigl
Copy link
Author

pefeigl commented Jul 30, 2024

As an example, with the following tags in the registry:

1.2.3-1_2024-01-17.7da0fd4
1.2.3-3_2024-01-18.5eceb63
1.2.3-4_2024-03-04.600aa2a
1.2.3_2024-03-04.600aa2a
1.2.3_2024-03-04.bc2e912
1.2.4-2_2024-03-15.a3db0f3
1.2.4-3_2024-03-15.18a741a
1.2.4_2024-03-15.18a741a

helm will use 1.2.3_2024-03-04.bc2e912 for semver =1.2.3.

@mtrmac mtrmac added the kind/feature A request for, or a PR adding, new functionality label Jul 30, 2024
@mtrmac mtrmac changed the title semver metadata after +/_ not ignored Option? to ignore semver metadata after _ Jul 30, 2024
Copy link

A friendly reminder that this issue had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for, or a PR adding, new functionality stale-issue
Projects
None yet
Development

No branches or pull requests

3 participants