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

[ResponseOps] Throwing a mustache error when validating action message for warnings #158668

Merged
merged 2 commits into from May 31, 2023

Conversation

doakalexi
Copy link
Contributor

@doakalexi doakalexi commented May 30, 2023

Resolves #158666

Summary

Adds a try/catch around mustache.parse to catch and ignore any errors when validating the action message for warnings.

Checklist

To verify

  • Create a rule and add a slack connector, and open dev tools console
  • In the action message type {{ - verify that an error is not thrown and that you can add the second open curly brace

@doakalexi doakalexi changed the title Catching error [ResponseOps] Throwing a mustache error when validating action message for warnings May 30, 2023
@doakalexi doakalexi added bug Fixes for quality problems that affect the customer experience Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels May 30, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
triggersActionsUi 1.4MB 1.4MB +21.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 416 420 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 500 504 +4
total +6

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@doakalexi doakalexi marked this pull request as ready for review May 30, 2023 17:40
@doakalexi doakalexi requested a review from a team as a code owner May 30, 2023 17:40
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@doakalexi doakalexi added release_note:skip Skip the PR/issue when compiling release notes release_note:fix and removed release_note:skip Skip the PR/issue when compiling release notes labels May 30, 2023
Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Verified the bug fix

@ymao1
Copy link
Contributor

ymao1 commented May 31, 2023

Will this be going into 8.8.1?

@doakalexi doakalexi merged commit 15b31c6 into elastic:main May 31, 2023
27 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 31, 2023
…e for warnings (elastic#158668)

Resolves elastic#158666

## Summary

Adds a try/catch around `mustache.parse` to catch and ignore any errors
when validating the action message for warnings.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### To verify

- Create a rule and add a slack connector, and open dev tools console
- In the action message type `{{` - verify that an error is not thrown
and that you can add the second open curly brace

(cherry picked from commit 15b31c6)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request May 31, 2023
…message for warnings (#158668) (#158776)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[ResponseOps] Throwing a mustache error when validating action
message for warnings
(#158668)](#158668)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alexi
Doak","email":"109488926+doakalexi@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-05-31T20:26:24Z","message":"[ResponseOps]
Throwing a mustache error when validating action message for warnings
(#158668)\n\nResolves
#158666
Summary\r\n\r\nAdds a try/catch around `mustache.parse` to catch and
ignore any errors\r\nwhen validating the action message for
warnings.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### To
verify\r\n\r\n- Create a rule and add a slack connector, and open dev
tools console\r\n- In the action message type `{{` - verify that an
error is not thrown\r\nand that you can add the second open curly
brace","sha":"15b31c62ba8d4a115c359d9bb723147866bbd34c","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:ResponseOps","v8.9.0","v8.8.1"],"number":158668,"url":"#158668
Throwing a mustache error when validating action message for warnings
(#158668)\n\nResolves
#158666
Summary\r\n\r\nAdds a try/catch around `mustache.parse` to catch and
ignore any errors\r\nwhen validating the action message for
warnings.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### To
verify\r\n\r\n- Create a rule and add a slack connector, and open dev
tools console\r\n- In the action message type `{{` - verify that an
error is not thrown\r\nand that you can add the second open curly
brace","sha":"15b31c62ba8d4a115c359d9bb723147866bbd34c"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"#158668
Throwing a mustache error when validating action message for warnings
(#158668)\n\nResolves
#158666
Summary\r\n\r\nAdds a try/catch around `mustache.parse` to catch and
ignore any errors\r\nwhen validating the action message for
warnings.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### To
verify\r\n\r\n- Create a rule and add a slack connector, and open dev
tools console\r\n- In the action message type `{{` - verify that an
error is not thrown\r\nand that you can add the second open curly
brace","sha":"15b31c62ba8d4a115c359d9bb723147866bbd34c"}},{"branch":"8.8","label":"v8.8.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Alexi Doak <109488926+doakalexi@users.noreply.github.com>
sloanelybutsurely pushed a commit to sloanelybutsurely/kibana that referenced this pull request Jun 6, 2023
…e for warnings (elastic#158668)

Resolves elastic#158666

## Summary

Adds a try/catch around `mustache.parse` to catch and ignore any errors
when validating the action message for warnings.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios


### To verify

- Create a rule and add a slack connector, and open dev tools console
- In the action message type `{{` - verify that an error is not thrown
and that you can add the second open curly brace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:fix Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.8.1 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ResponseOps] Throwing a mustache error when validating action message for warnings
5 participants