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

[Task Manager] Task Type deprecation isn't possible #96581

Closed
gmmorris opened this issue Apr 8, 2021 · 2 comments
Closed

[Task Manager] Task Type deprecation isn't possible #96581

gmmorris opened this issue Apr 8, 2021 · 2 comments
Labels
estimate:needs-research Estimated as too large and requires research to break down into workable issues Feature:Task Manager resilience Issues related to Platform resilience in terms of scale, performance & backwards compatibility Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@gmmorris
Copy link
Contributor

gmmorris commented Apr 8, 2021

context

We don't have a good mechanism for deprecating Task Types.

When a Task Type is removed in a version, it is possible to end up with old tasks that are left over from older versions and these never get cleaned up.

A recent change meant that this no longer breaks Task manager (and it proactively marks them as unrecognizable), but we don't have a good mechanism for proactively handling those tasks.

This is especially pertinent with the upcoming change where we're moving work that used to be in tasks, out of them. When a user upgrades a Kibana env that has several queued up tasks, we would expect those tasks to still be executed after the upgrade, even if we don't intent on supporting those going forward.
This is even more pertinent with potential introduction of "temporary" Task Types (such as the one proposed here), which we only need for a couple of minors to address a problem, but might not be relevant after wards.

proposal

This isn't the only way to address this, so feel free to take another approach, but what I have in mind is something like this:

  1. A developer can mark a Task Type as deprecated, but they still provide the Task Type implementation.
  2. When Kibana finds a deprecated type - it will execute it as it did before.
  3. When code tried to schedule a deprecated task, we can choose to either execute it as always with a warning, or reject the scheduling of the new task (presumably, this would be up to the developer).
  4. At some point, a deprecated task type could be removed entirely, but the semantic to that depend on how we treat breaking changes going forward (major version? etc.)

The nice part about this approach is that developers could actually provide a "clean up" implementation (instead of the original implementation) when they deprecate the task type - so it could be used to gracefully clean up the legacy task, or unschedule it if it's a recurring task.

@gmmorris gmmorris added Feature:Task Manager Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Apr 8, 2021
@elasticmachine
Copy link
Contributor

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

@gmmorris gmmorris added loe:needs-research This issue requires some research before it can be worked on or estimated resilience Issues related to Platform resilience in terms of scale, performance & backwards compatibility labels Jul 15, 2021
@gmmorris gmmorris added the estimate:needs-research Estimated as too large and requires research to break down into workable issues label Aug 18, 2021
@gmmorris gmmorris removed the loe:needs-research This issue requires some research before it can be worked on or estimated 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
@mikecote
Copy link
Contributor

Closing as we've implemented a deprecated task types list in Task Manager that developers can use to remove their task definition from Kibana.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate:needs-research Estimated as too large and requires research to break down into workable issues Feature:Task Manager resilience Issues related to Platform resilience in terms of scale, performance & backwards compatibility Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

No branches or pull requests

4 participants