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

[Actions][7.x] Move saved object fields to references for action_task_params #108082

Closed
chrisronline opened this issue Aug 10, 2021 · 1 comment · Fixed by #108964
Closed

[Actions][7.x] Move saved object fields to references for action_task_params #108082

chrisronline opened this issue Aug 10, 2021 · 1 comment · Fixed by #108964
Assignees
Labels
estimate:medium Medium Estimated Level of Effort Feature:Actions/Framework Issues related to the Actions Framework Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture

Comments

@chrisronline
Copy link
Contributor

Relates to #100067

To prepare for the upcoming saved object ID migration, we need to move saved object fields to use references properly so the 8.0 migration will automatically update them.

We need to add a migration that will move action_task_params.relatedSavedObjects and action_task_params.actionId to saved object references. For both, there isn't exactly a 1-1 match between the data structures.

For actionId, I'd imagine the reference object to look like: { id: actionId, type: 'action', name: 'action' }

For relatedSavedObjects, it's a little more complicated. The id and type are straight-forward, but the saved object reference requires a name which might map to relatedSavedObject.typeId or something similar. The other piece of noteworthy data is relatedSavedObject.namespace which I think can safely be dropped, as the action_task_params saved object will always exist in the same space as the action that created it.

In addition to the migration, we need to change the code that writes and reads.

See the PoC PR for more insight into how this might work.

@chrisronline chrisronline added loe:large Large Level of Effort Feature:Actions Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Actions/Framework Issues related to the Actions Framework labels Aug 10, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@ymao1 ymao1 self-assigned this Aug 12, 2021
@ymao1 ymao1 removed their assignment Aug 12, 2021
@gmmorris gmmorris added technical debt Improvement of the software architecture and operational architecture and removed Feature:Actions labels Aug 13, 2021
@ymao1 ymao1 self-assigned this Aug 16, 2021
@gmmorris gmmorris added the estimate:medium Medium Estimated Level of Effort label Aug 18, 2021
@gmmorris gmmorris removed the loe:large Large Level of Effort label Sep 2, 2021
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate:medium Medium Estimated Level of Effort Feature:Actions/Framework Issues related to the Actions Framework Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants