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

[Response Ops][Actions] PagerDuty action UI improvements #175342

Closed
ymao1 opened this issue Jan 23, 2024 · 4 comments · Fixed by #175507
Closed

[Response Ops][Actions] PagerDuty action UI improvements #175342

ymao1 opened this issue Jan 23, 2024 · 4 comments · Fixed by #175507
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Actions Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@ymao1
Copy link
Contributor

ymao1 commented Jan 23, 2024

The Pagerduty action UI allows users to save even when there is a lint error in the Custom Details field

Here, there is a small red line indicating invalid JSON but I'm able to click save anyway.
Screenshot 2024-01-23 at 1 30 25 PM

Then, when clearing the Custom Details field, the field is set to an empty string, which will fail validation when running the action.
Clearing the above text box changes custom details from

"customDetails": "{ \n {{context.json}} \n}"

to

"customDetails": ""

which will cause the action to fail. User has to then manually change the custom details input to {} so that it is considered valid JSON, which is what the schema validation expects.

@ymao1 ymao1 added bug Fixes for quality problems that affect the customer experience Feature:Actions Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Jan 23, 2024
@elasticmachine
Copy link
Contributor

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

@cnasikas
Copy link
Member

@ymao1 Don't the params get validated when saving the rule? Saving a rule with "customDetails": "" should fail, right?

@ymao1
Copy link
Contributor Author

ymao1 commented Jan 24, 2024

It looks like we don't validate the action params when saving the rule. Likely due to the fact that the params could contain context variables and we can inject those until runtime. Does that sound correct @pmuellr?

@cnasikas cnasikas assigned adcoelho and unassigned cnasikas Jan 24, 2024
@adcoelho
Copy link
Contributor

It looks like we don't validate the action params when saving the rule. Likely due to the fact that the params could contain context variables and we can inject those until runtime.

@ymao1 that is exactly it, ill handle it 👍

adcoelho added a commit that referenced this issue Jan 25, 2024
Fixes #175342 

## Summary

The Pagerduty action UI does not allow users to save when there are
linting errors in the `Custom Details` field.

Previously the validation was skipped if there were Mustache templates
in the field.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jan 25, 2024
)

Fixes elastic#175342

## Summary

The Pagerduty action UI does not allow users to save when there are
linting errors in the `Custom Details` field.

Previously the validation was skipped if there were Mustache templates
in the field.

(cherry picked from commit 8fe7433)
kibanamachine added a commit that referenced this issue Jan 25, 2024
) (#175540)

# Backport

This will backport the following commits from `main` to `8.12`:
- [[ResponseOps][Connectors] Fix bug in PagerDuty Connector
(#175507)](#175507)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT
[{"author":{"name":"Antonio","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-01-25T13:32:38Z","message":"[ResponseOps][Connectors]
Fix bug in PagerDuty Connector (#175507)\n\nFixes #175342 \r\n\r\n##
Summary\r\n\r\nThe Pagerduty action UI does not allow users to save when
there are\r\nlinting errors in the `Custom Details`
field.\r\n\r\nPreviously the validation was skipped if there were
Mustache templates\r\nin the
field.","sha":"8fe74333a841817a93e329acc17c1b598d6d5688","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Feature:Actions","Team:ResponseOps","v8.12.1","v8.13.0"],"title":"[ResponseOps][Connectors]
Fix bug in PagerDuty
Connector","number":175507,"url":"https://github.com/elastic/kibana/pull/175507","mergeCommit":{"message":"[ResponseOps][Connectors]
Fix bug in PagerDuty Connector (#175507)\n\nFixes #175342 \r\n\r\n##
Summary\r\n\r\nThe Pagerduty action UI does not allow users to save when
there are\r\nlinting errors in the `Custom Details`
field.\r\n\r\nPreviously the validation was skipped if there were
Mustache templates\r\nin the
field.","sha":"8fe74333a841817a93e329acc17c1b598d6d5688"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/175507","number":175507,"mergeCommit":{"message":"[ResponseOps][Connectors]
Fix bug in PagerDuty Connector (#175507)\n\nFixes #175342 \r\n\r\n##
Summary\r\n\r\nThe Pagerduty action UI does not allow users to save when
there are\r\nlinting errors in the `Custom Details`
field.\r\n\r\nPreviously the validation was skipped if there were
Mustache templates\r\nin the
field.","sha":"8fe74333a841817a93e329acc17c1b598d6d5688"}}]}]
BACKPORT-->

Co-authored-by: Antonio <[email protected]>
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this issue Feb 15, 2024
)

Fixes elastic#175342 

## Summary

The Pagerduty action UI does not allow users to save when there are
linting errors in the `Custom Details` field.

Previously the validation was skipped if there were Mustache templates
in the field.
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 Feature:Actions Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants