-
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
[Task Manager] Support excluding certain task types from executing #111036
[Task Manager] Support excluding certain task types from executing #111036
Conversation
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
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! Verified that adding different values to the excluded array works as expected. It would be nice to add a functional test for this...not sure how hard that would be?
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. Thanks for adding the functional test! Left a suggestion for the README since I don't think this is meant just for debugging purposes?
Co-authored-by: Mike Côté <[email protected]>
@elasticmachine merge upstream |
8da2603
to
587f6a2
Compare
Co-authored-by: gchaps <[email protected]>
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 - left a note about the logging when the new config is set. Seems like it could be useful to see this at an info or warning level, as opposed to debug level.
} | ||
|
||
if (this.config.unsafe.exclude_task_types.length) { | ||
this.logger.debug( |
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.
Since we've labelled this as unsafe/experimental, wondering if we should elevate this message to an info, or perhaps even warning.
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.
+1 to a warning. It would make it clear what's happening without a way to ignore it.
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.
Good idea!
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
…lastic#111036) * Support excluding certain action types * Fix types * Fix jest tests * Flip this * Add functional test * Add to README * Updated README * Add startup log * Update x-pack/plugins/task_manager/README.md Co-authored-by: Mike Côté <[email protected]> * Add telemetry * Add test * Rename internal to unsafe * Update test config * Fix tests * Update x-pack/plugins/task_manager/README.md Co-authored-by: gchaps <[email protected]> * PR feedback Co-authored-by: Mike Côté <[email protected]> Co-authored-by: gchaps <[email protected]>
…111036) (#112022) * Support excluding certain action types * Fix types * Fix jest tests * Flip this * Add functional test * Add to README * Updated README * Add startup log * Update x-pack/plugins/task_manager/README.md Co-authored-by: Mike Côté <[email protected]> * Add telemetry * Add test * Rename internal to unsafe * Update test config * Fix tests * Update x-pack/plugins/task_manager/README.md Co-authored-by: gchaps <[email protected]> * PR feedback Co-authored-by: Mike Côté <[email protected]> Co-authored-by: gchaps <[email protected]> Co-authored-by: Mike Côté <[email protected]> Co-authored-by: gchaps <[email protected]>
Resolves #108757
We want to prevent users from disabling the alerting teams plugins (which we did here) but still want to provide an option to disable rules/actions from executing if necessary (usually to isolate some performance issue).
This PR exposes a new, undocumented config to task manager, called
xpack.task_manager.internal.exclude_task_types
, that allows users to specify an array of task types that will not execute. This config supports using a wildcard*
to do pattern matching on the task type. All task types that match any of the configured patterns will not execute but remain in the queue (they won't ever be claimed by Kibanas configured to exclude them)