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

run retention rule failed with special pattern #14259

Closed
bitsf opened this issue Feb 18, 2021 · 4 comments · Fixed by #14345
Closed

run retention rule failed with special pattern #14259

bitsf opened this issue Feb 18, 2021 · 4 comments · Fixed by #14345

Comments

@bitsf
Copy link
Contributor

bitsf commented Feb 18, 2021

When add 2 repositories with
distribution-portal/administration-distribution-portal,distribution-portal/client-distribution-portal,
it fails the Dry Run with an Internal server error.
Feb 12 11:21:19 172.22.9.1 core[1153]: 2021-02-12T10:21:19Z [ERROR] [/lib/http/error.go:54]: {"errors":[{"code":"INTERNAL_SERVER_ERROR","message":"launcher: syntax error in pattern"}]}
image

If create a rule with just a single repository either using portal/administration-distribution-portal or distribution-portal/client-distribution-portal then the Dry run is successful.

@bitsf bitsf self-assigned this Feb 19, 2021
@bitsf
Copy link
Contributor Author

bitsf commented Feb 20, 2021

The problem is because the dependency golang library github.com/bmatcuk/doublestar is splitting string by '/' first, then splitting ','
That means it can support pattern AA/{a,b}, but not {AA/a,AA/b}
image

And the braces is auto added from UI code when find a comma, so even use pattern AA/{a,b}, it will be converted to {AA/{a,b}} which is also bad syntax

@bitsf
Copy link
Contributor Author

bitsf commented Feb 20, 2021

@AllForNothing Into consideration, we may remove the logic that auto add braces from UI code, and check if user doesn't add braces when having comma

@xaleeks
Copy link
Contributor

xaleeks commented Mar 3, 2021

can we make sure to have this fixed in a 2.2 patch release? @bitsf @AllForNothing

@AllForNothing
Copy link
Contributor

AllForNothing commented Mar 4, 2021

Sure, this UI Fix can be cherry-picked to the 2.2 branch,see #14357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants