Open chzar opened 1 week ago
Does targetRevision: 'foo/bar/ >= v1.0.0-rc1'
mean that the newest version since v1.0.0-rc1
should be used?
correct, so if the latest tag is foo/bar/v2.0.0 then that is what should be returned. No change to how semver works currently. It should simply be possible to specify a path prefix.
At my organization - we have teams that use release tags on github. We would like to give them a practical option to keep using that workflow on ArgoCD as well. But, we want to add the ability to deploy on different argo clusters by adding a path prefix in front of the semver and optionally distinguishing between releases in a monorepo.
There have been broader discussions (#18899, #5609 for example) in the Argo project about having more options when using tags in target revisions, but would require changes in the upstream library Argo is using to parse semver tags. This change will give teams degree of flexibility without any breaking changes.
@andrii-korotkov-verkada I have updated the PR to support the original semver constraints format (ex: >= /foo/bar/v1.0.0 < foo/bar/v2.0.0)
Summary
Allow the use of hierarchical tags in semver target revisions
Motivation
Teams want to use hierarchical tags for
Proposal
How do you think this should be implemented?
Use regex to filter prefixes out of semver and constraint strings so they can be processed. Ensure prefixes are considered during matching.