-
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
Moves Task manager's interval under a generic schedule field #52727
Moves Task manager's interval under a generic schedule field #52727
Conversation
… whole mocking library
…o task-manager/run-now
@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.
LGTM
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.
Great work 👍 LGTM, just a few nits.
@@ -14,7 +14,9 @@ import { | |||
RangeBoolClause, | |||
} from './query_clauses'; | |||
|
|||
export const RecuringTaskWithInterval: ExistsBoolClause = { exists: { field: 'task.interval' } }; | |||
export const TaskWithRecurringSchedule: ExistsBoolClause = { |
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.
nit: TaskWithSchedule
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.
No a nit at all, we changed that name and I missed it :)
Thanks!
@@ -91,7 +94,7 @@ export function initRoutes(server, taskTestingEvents) { | |||
payload: Joi.object({ | |||
task: Joi.object({ | |||
taskType: Joi.string().required(), | |||
interval: Joi.string().optional(), | |||
schedule: Joi.string().optional(), |
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.
schedule: Joi.string().optional(), | |
schedule: Joi.object({ | |
interval: Joi.string(), | |
}).optional(), |
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.
eek why wasn't that caught by functional test?? Investigating
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.
ahhh because we don't send a new interval on the ensure api call.... that's why.
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.
We don't need that in that API call (our type ensures this is in the actual TM) in our FTs so this'll be removed
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…#52727) This moves the interval field under a generic schedule object field in preparation for the introduction of richer scheduling options (such as cron). It includes a migration for existing tasks, and we've ensured no existing Task Type Definitions exist in Kibana that rely on Interval. This includes support for the deprecated interval field (which gets mapped to schedule) but that support will be removed in 8.0.0, as it's a breaking change.
…#53295) This moves the interval field under a generic schedule object field in preparation for the introduction of richer scheduling options (such as cron). It includes a migration for existing tasks, and we've ensured no existing Task Type Definitions exist in Kibana that rely on Interval. This includes support for the deprecated interval field (which gets mapped to schedule) but that support will be removed in 8.0.0, as it's a breaking change.
…lastic#52873) Follow up from the elastic#52727 in Task Manager, we want Alerting and Task Manager to align on their schedule api (in the near future, Alerting will actually use Task manager's schedule system to remove this duplication).
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
Summary
This moves the
interval
field under a genericschedule
object field in preparation for the introduction of richer scheduling options (such as cron).It includes a migration for existing tasks, and we've ensured no existing Task Type Definitions exist in Kibana that rely on Interval.
This includes support for the deprecated
interval
field (which gets mapped toschedule
) but that support will be removed in 8.0.0, as it's a breaking change.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.This was checked for cross-browser compatibility, including a check against IE11Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportUnit or functional tests were updated or added to match the most common scenariosThis was checked for keyboard-only and screenreader accessibilityFor maintainers