Checklist:
Describe the bug
With #10641 Argo introduced the "Wildcard support in OCI Helm Repositories targetRevision".
A full semver compatible chart version looks like this: <version core> "-" <pre-release> "+" <build>, e.g. 1.2.3-rc1+abcdefgh.
Bug: Argo fails to resolve the targetRevision: "*" wildcard if a build identifier is part of the chart version in the OCI repo.
Background info: OCI tags are not semver compatible. The "+" character is not allowed. Helm worked around this by converting "+" to "_" before pushing to the OCI repo and vice versa when pulling from the repo.
Helm prints the following hint when this happens:
OCI artifact references (e.g. tags) do not support the plus sign (+). To support
storing semantic versions, Helm adopts the convention of changing plus (+) to
an underscore (_) in chart version tags when pushing to a registry and back to
a plus (+) when pulling from a registry.
Argo CD is not respecting this convention and considers a tag "1.2.3-rc1_abcdefgh" invalid semver.
To Reproduce
- Create OCI repo
- Push chart to OCI repo with a version including a build identifier (e.g. 1.2.3+abcdefgh)
- Register OCI repo with Argo CD
- Create Argo Application referencing the chart and setting targetRevision: "*"
- -> Argo CD prints the errors shown below (Logs)
Expected behavior
Argo CD respects Helm convention how build identifiers are handled in case of OCI registries and converts "_" back to "+" before trying to find matching versions. Argo CD successfully installs latest Helm chart matching the targetRevision wildcard, even if build identifier is included in the chart version.
Version
2.7.4 and master (2023-06-16)
Logs
UI Shows:
repo-server {"error":"no version for constraints: constraint not found in 1 tags","grpc.code":"Unknown","grpc.method":"GenerateManifest","grpc.service":"repository.RepoServerService","grpc.start_time":"2023-06-16T11:15:56Z","grpc.time_ms":161.567,"level":"error","msg":"finished unary call with code Unknown","span.kind":"server","system":"grpc","time":"2023-06-16T11:15:56Z"}
repo-server with debug level:
repo-server {"level":"debug","msg":"Invalid semantic version: 1.2.3_553b3905","time":"2023-06-16T11:21:56Z"}
Checklist:
argocd version.Describe the bug
With #10641 Argo introduced the "Wildcard support in OCI Helm Repositories targetRevision".
A full semver compatible chart version looks like this:
<version core> "-" <pre-release> "+" <build>, e.g.1.2.3-rc1+abcdefgh.Bug: Argo fails to resolve the
targetRevision: "*"wildcard if a build identifier is part of the chart version in the OCI repo.Background info: OCI tags are not semver compatible. The "+" character is not allowed. Helm worked around this by converting "+" to "_" before pushing to the OCI repo and vice versa when pulling from the repo.
Helm prints the following hint when this happens:
Argo CD is not respecting this convention and considers a tag "1.2.3-rc1_abcdefgh" invalid semver.
To Reproduce
Expected behavior
Argo CD respects Helm convention how build identifiers are handled in case of OCI registries and converts "_" back to "+" before trying to find matching versions. Argo CD successfully installs latest Helm chart matching the targetRevision wildcard, even if build identifier is included in the chart version.
Version
2.7.4 and master (2023-06-16)
Logs
UI Shows:
repo-server with debug level: