Support Helm semver encoding in OCI repositories #1834
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
(See also the related fluxcd/flux2#4674, which gave me the hint I needed.)
I'm attempting to use a Helm chart with versions like
0.20250616.4188+ref.2dec694(which gets encoded as the tag:0.20250616.4188_ref.2dec694) with the instructions here: https://fluxcd.io/flux/cheatsheets/oci-artifacts/#helm-ociUnfortunately, because
0.20250616.4188_ref.2dec694is not a valid semver, I get the error message:Based on the documentation at https://helm.sh/docs/topics/registries/#oci-feature-deprecation-and-behavior-changes-with-v380 and the discussion at opencontainers/distribution-spec#154, it seems plausible to assume that replacing
_with+(one time) when parsing semantic versions from tags is a reasonable thing to do. I'd be willing to discuss fetching the annotations for all the OCI manifests, but I suspect that's undesirable from an efficiency point of view. I'd also be willing to add a verification of theorg.opencontainers.image.versionannotation on the actually selected tag, but I was trying to minimize the amount of load Flux induces while supporting build metadata in semver.