-
Notifications
You must be signed in to change notification settings - Fork 258
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
Routing template evaluates the payload correctly yet 'Regular expression is incorrect' #4259
Labels
Comments
After prodding at the expression some more, I have found out that the error is caused by hyphens in variable values (cert-manager, kube-system, etc.). Putting those in a |
Looks like a bug where filtering_term_type is not being set so the entire template is being treated as regex instead of jinja2. |
3 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
May 23, 2024
…4357) # What this PR does When editing a jinja route template the filtering_term_type was not being provided so it was being validated as regex instead. This adds the missing flag so that the route will use the correct validation. The reason this was not being hit in the past is most jinja templates were still passing regex validation. ## Which issue(s) this PR closes Closes #4259 <!-- *Note*: if you have more than one GitHub issue that this PR closes, be sure to preface each issue link with a [closing keyword](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue). This ensures that the issue(s) are auto-closed once the PR has been merged. --> ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What went wrong?
What happened:
Upon creating a routing template in an Alertmanager integration, the template evaluates to True or False depending on payload, yet I cannot save it due to a 'Regular expression is incorrect' error. Here is the template:
What did you expect to happen:
Since the template correctly evaluates to True of False, it should contain no errors and I must be able to save it
How do we reproduce it?
Grafana OnCall Version
v1.4.3
Product Area
Alert Flow & Configuration
Grafana OnCall Platform?
Kubernetes
User's Browser?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0
Anything else to add?
No response
The text was updated successfully, but these errors were encountered: