-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Fixed ad-hoc actions tasks remain as "running" when they timeout by adding cancellation support #120853
[Actions] Fixed ad-hoc actions tasks remain as "running" when they timeout by adding cancellation support #120853
Conversation
…meout by adding cancellation support
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
We are adding an |
I'm a little confused how just implementing a basically no-op This appears to be the code that TM uses itself to cancel tasks on timeout: kibana/x-pack/plugins/task_manager/server/task_pool.ts Lines 210 to 218 in 3672215
And here is the code in the task runner that will end up getting called from that (same code in the ephemeral task runner): kibana/x-pack/plugins/task_manager/server/task_running/task_runner.ts Lines 427 to 435 in 3672215
So it looks like setting Or maybe I'm missing something. But if that was it, I think adding a comment to that indicating that it will cause the task state of running to be cleared would be good. |
@elasticmachine merge upstream |
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.
Wondering if we could simplify the logic that's used for getting the actionInfo
that's used for the event log entry
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
…m/YulNaumenko/kibana into alerting-actions-task-canceletion
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @YulNaumenko |
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.
LGTM; works as expected
@mikecote - thinking we should create a follow-up issue to allow a connector executor to determine if the task has been cancelled, and to provide the cancellable es client - same stuff we did for rule executors; low priority, since we aren't expecting timeouts for most connectors ...
Agreed, I'll try and create one unless you beat me to it! I think we have one already for the research that we could re-purposed to also make connector types leverage cancellation as mentioned ^^. |
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.
LGTM
…meout by adding cancellation support (elastic#120853) * [Actions] Fixed ad-hoc actions tasks remain as "running" when they timeout by adding cancellation support * fixed test * fixed tests * fixed test * removed test data * fixed typechecks * fixed typechecks * fixed typechecks * fixed tests * fixed typechecks * fixed tests * fixed typechecks * fixed test * fixed tests * fixed tests * changed unit tests * fixed tests * fixed jest tests * fixed typechecks Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit 158a9a5)
…meout by adding cancellation support (#120853) (#123417) * [Actions] Fixed ad-hoc actions tasks remain as "running" when they timeout by adding cancellation support * fixed test * fixed tests * fixed test * removed test data * fixed typechecks * fixed typechecks * fixed typechecks * fixed tests * fixed typechecks * fixed tests * fixed typechecks * fixed test * fixed tests * fixed tests * changed unit tests * fixed tests * fixed jest tests * fixed typechecks Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit 158a9a5)
Summary
Provided cancel function with the proper logging for the actions task.
Resolves #119647
Resolves #64148
Testing steps:
5m
.(before)
(after)
5m
and the proper logs was added to the Kibana log:And new event log record: