-
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
Poc backfill actions #199218
base: main
Are you sure you want to change the base?
Poc backfill actions #199218
Conversation
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
It looks like the routes are like this:
There's "path contention" between the POST and GET and DELETE paths, if What if we added an "update" route? You'd think it would be the following, but then we'd have a problem IF we allowed users to create arbitrary ids and they used
I don't think this is a big deal, not sure it's worth making our URLs even longer :-). But perhaps we can add a comment where we create the UUID to briefly explain that due to the URL structure, the id's MUST be at least legal UUIDs (v4?) and not arbitrary strings. So we don't "accidently" have a URL collision later. |
@ymao1 re "Rules with unsupported actions (alert summary on custom interval) will return an error during scheduling (we can change this to ignore the unsupported action if desired)." We'd like to schedule other actions for these rules, and inform users that alert summary on custom interval will not be executed for the manual runs. cc @ARWNightingale |
@approksiu Sure, I can look into returning some sort of warning reason while still allowing the backfill to be scheduled. |
{ | ||
type: 'mappings_addition', | ||
addedMappings: { | ||
priority: { type: 'integer' }, |
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.
\o/ this move will probably help us with #194627. Would we / could we start persisting priority for all tasks on update and eventually more to a non-scripted sort in the task claimer?
if (doc['task.priority'].size() != 0) { | ||
return doc['task.priority'].value; | ||
} else if (params.priority_map.containsKey(taskType)) { |
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.
I was looking at the values for TaskPriority
export enum TaskPriority {
Low = 1,
Normal = 50,
}
Before we start persisting them in the implementation PR, I wonder if we should review the values / order. I think 1 and 50 are ok, but I wonder if 1 should represent top priority and 50 being lower.
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.
Either would work! The way it currently is, we would sort by priority=descending which makes more sense in my head but definitely an argument for the reverse
Summary
Based on the discussion in https://github.com/elastic/security-team/issues/10824, this POC adds a flag to the schedule backfill API for whether to run actions during the backfill.
Supported action configurations:
Unsupported action configurations:
Implementation notes: