You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Hello, I'm trying to create an immutability rule for all SemVer tags corresponding to "normal" release versions (refered as <version core> at https://semver.org/).
It seems even the tag matching is made using doublestar, wich is really limiting to describe widely-used SemVer tags, as [0-9].[0-9].[0-9] would only match versions with major/minor/patch up to 9, whereas *.*.* would match versions with major/minor/patch even over 9 but also any pre-release or build variants of the same version...
Describe the solution you'd like
I would have expected tag matching rules to use a less limiting regexp engine, like https://pkg.go.dev/regexp#Regexp.Match, as doublestar is really nice for repo paths matching, but really poor for SemVer or any more generic tags matching...
Describe the main design/architecture of your solution
Replace doublestar.Match by regexp.Match for tag rules (breaking API, maybe not desired) or allow kind: 'regexp' in addition to kind: 'doublestar' (by creating a regexp selector available at least for RetentionSelector and ImmutableSelector + maybe RetentionSelectorMetadata)
Describe the development plan you've considered
I could contribute directly for option 1, but option 2 might be a bit too high-level for my coding skills 😅
Unless option 2 is just adding regexp/selector.go and regexp/selector_test.go to /src/lib/selector/selectors ? but I bet I'm dreaming 🤣
Additional context
I'm currently stuck with Harbor version 2.5.6 because of my cloud provider offer, but able to start a higher version aside with a custom deployment if it could help testing 😉
The text was updated successfully, but these errors were encountered:
I've opened bmatcuk/doublestar#91 to ask for quantifier support for character classes in doublestar which would at least allow [0-9]+.[0-9]+.[0-9]+ matching
Is your feature request related to a problem? Please describe.
Hello, I'm trying to create an immutability rule for all SemVer tags corresponding to "normal" release versions (refered as
<version core>
at https://semver.org/).It seems even the tag matching is made using doublestar, wich is really limiting to describe widely-used SemVer tags, as
[0-9].[0-9].[0-9]
would only match versions with major/minor/patch up to 9, whereas*.*.*
would match versions with major/minor/patch even over 9 but also any pre-release or build variants of the same version...Describe the solution you'd like
I would have expected tag matching rules to use a less limiting regexp engine, like https://pkg.go.dev/regexp#Regexp.Match, as doublestar is really nice for repo paths matching, but really poor for SemVer or any more generic tags matching...
Describe the main design/architecture of your solution
Replace doublestar.Match by regexp.Match for tag rules (breaking API, maybe not desired) or allow
kind: 'regexp'
in addition tokind: 'doublestar'
(by creating a regexp selector available at least forRetentionSelector
andImmutableSelector
+ maybeRetentionSelectorMetadata
)Describe the development plan you've considered
I could contribute directly for option 1, but option 2 might be a bit too high-level for my coding skills 😅
Unless option 2 is just adding
regexp/selector.go
andregexp/selector_test.go
to/src/lib/selector/selectors
? but I bet I'm dreaming 🤣Additional context
I'm currently stuck with Harbor version 2.5.6 because of my cloud provider offer, but able to start a higher version aside with a custom deployment if it could help testing 😉
The text was updated successfully, but these errors were encountered: