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

Tasks of removed types cause script errors #84088

Closed
gmmorris opened this issue Nov 23, 2020 · 3 comments · Fixed by #84273
Closed

Tasks of removed types cause script errors #84088

gmmorris opened this issue Nov 23, 2020 · 3 comments · Fixed by #84273
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Task Manager Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@gmmorris
Copy link
Contributor

If a task type definition is removed from kibana, old tasks of that type cause a script error as our painless script throws a null pointer exception when looking for their maxAttempts value in the taskMaxAttempts map.

This change was introduced in 7.11.0 we should fix this before this version is released.

@gmmorris gmmorris added bug Fixes for quality problems that affect the customer experience Feature:Task Manager Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Nov 23, 2020
@elasticmachine
Copy link
Contributor

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

@ymao1
Copy link
Contributor

ymao1 commented Nov 24, 2020

Draft PR here: #84273

I added unit tests but wasn't sure how to add a functional test for this. Since the task manager doesn't allow for removal of registered types, I would have to start the task manager, register a set of tasks, schedule some tasks, then restart task manager with one of the task types removed to recreate the issue. Is that possible? Or is there a simpler way of doing that?

@gmmorris

@gmmorris
Copy link
Contributor Author

Draft PR here: #84273

I added unit tests but wasn't sure how to add a functional test for this. Since the task manager doesn't allow for removal of registered types, I would have to start the task manager, register a set of tasks, schedule some tasks, then restart task manager with one of the task types removed to recreate the issue. Is that possible? Or is there a simpler way of doing that?

@gmmorris

It might be that testing this on the current testing framework isn't worth the investment (we've encountered this before).
The one idea I have is to possibly use esArchiver to load a task type that Kibana doesn't know. You don't actually need it to be an old type that doesn't exist anymore, it can be any type that Kibana isn't aware of (I think 🤔 )

@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
bug Fixes for quality problems that affect the customer experience Feature:Task Manager Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants