-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 dashboard_telemetry task type to use stateSchemaByVersion for task state validation #161855
Onboard dashboard_telemetry task type to use stateSchemaByVersion for task state validation #161855
Conversation
Pinging @elastic/kibana-presentation (Team:Presentation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes make sense to me, LGTM! Tested locally by ensuring the telemetry collection task runs and that everything still adds up as expected.
import { TASK_ID } from './dashboard_telemetry_collection_task'; | ||
import { emptyState, type LatestTaskStateSchema } from './task_state'; | ||
|
||
// TODO: Merge with LatestTaskStateSchema. Requires a refactor of collectPanelsByType() because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this TODO something that we should tackle on the Presentation team side? What is the priority?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, I don't foresee urgency on having this fixed, it's mainly if the presentation team would like to have a single source of type definitions after this PR merges. It can be considered technical debt, otherwise the engineer will have to add their new telemetry field in two places.
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @mikecote |
… task state validation (elastic#161855) Part of elastic#159342. In this PR, I'm preparing the `dashboard_telemetry` for serverless by defining an explicit task state schema. This schema is used to validate the task's state before saving the task but also when reading the task. 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 elastic#155764). For more information on how to use `stateSchemaByVersion`, see elastic#159048 and https://github.com/elastic/kibana/blob/main/x-pack/plugins/task_manager/README.md. --------- Co-authored-by: Kibana Machine <[email protected]>
… task state validation (elastic#161855) Part of elastic#159342. In this PR, I'm preparing the `dashboard_telemetry` for serverless by defining an explicit task state schema. This schema is used to validate the task's state before saving the task but also when reading the task. 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 elastic#155764). For more information on how to use `stateSchemaByVersion`, see elastic#159048 and https://github.com/elastic/kibana/blob/main/x-pack/plugins/task_manager/README.md. --------- Co-authored-by: Kibana Machine <[email protected]>
Part of #159342.
In this PR, I'm preparing the
dashboard_telemetry
for serverless by defining an explicit task state schema. This schema is used to validate the task's state before saving the task but also when reading the task. 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.