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

Onboard response ops tasks to use stateSchemaByVersion for task state validation #161581

Merged
merged 13 commits into from
Jul 13, 2023

Conversation

mikecote
Copy link
Contributor

@mikecote mikecote commented Jul 10, 2023

Part of #159342.

In this PR, I'm preparing the non-alerting (rule types) response ops task types for serverless by defining an explicit task state schema. This schema is used to validate the task's state before saving but also when reading. In the scenario an older Kibana node runs a task after a newer Kibana node has stored additional task state, the unknown state properties will be dropped. Additionally, this will prompt developers to be aware that adding required fields to the task state is a breaking change that must be handled with care. (see #155764).

For more information on how to use stateSchemaByVersion, see #159048 and https://github.com/elastic/kibana/blob/main/x-pack/plugins/task_manager/README.md.

@mikecote mikecote added Feature:Alerting Feature:Task Manager Feature:Actions Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Jul 10, 2023
@mikecote mikecote self-assigned this Jul 10, 2023
@mikecote mikecote added release_note:skip Skip the PR/issue when compiling release notes v8.10.0 labels Jul 10, 2023
@mikecote mikecote marked this pull request as ready for review July 12, 2023 10:35
@mikecote mikecote requested a review from a team as a code owner July 12, 2023 10:35
@elasticmachine
Copy link
Contributor

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

@mikecote
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 14 16 +2
securitySolution 411 415 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 15 17 +2
securitySolution 490 494 +4
total +6

History

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

cc @mikecote

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

@mikecote mikecote merged commit 0afc95a into elastic:main Jul 13, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Actions Feature:Alerting Feature:Task Manager release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.10.0
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

5 participants