-
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
[ML] Additional job spaces initialization #83127
[ML] Additional job spaces initialization #83127
Conversation
Pinging @elastic/ml-ui (:ml) |
x-pack/plugins/ml/server/saved_objects/initialization/space_overrides.test.ts
Outdated
Show resolved
Hide resolved
Pinging @elastic/apm-ui (Team:apm) |
Pinging @elastic/uptime (Team:uptime) |
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.
APM changes look good.
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.
Tested initialization of ML jobs (not including logs UI jobs) and 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.
LGTM 👍
@elasticmachine merge upstream |
@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 uptime changes, we will discuss inside out team, if we also need to limit uptime anomaly jobs per space.
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.
Tested successfully with jobs from the Logs UI. Thanks for taking care of them!
The Metrics UI also has an ML integration patterned after the one in the Logs UI. Their jobs might require the same treatment. Since I'm not familiar with the implementation differences, though, I'd like to defer to @phillipb for an opinion. 😇
const { initSavedObjects } = repairFactory(client, jobSavedObjectService); | ||
const { jobs } = await initSavedObjects(); | ||
const { jobs } = await initSavedObjects(false, jobSpaceOverrides); | ||
mlLog.info(`${jobs.length} job saved objects initialized for * space`); |
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: now that the space can be overridden per job this message might be misleading.
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.
Updated in 663fa14
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.
Thanks for this on our side! Good to see all of this coming together.
@weltenwort thanks for the heads up. From the looks of it, we would need basically the exact same treatment for job ids:
@jgowdyelastic should that be apart of this PR? |
Ok thanks @phillipb , yes i'll add these now. |
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.
Security Solution changes LGTM 👍
💚 Build SucceededMetrics [docs]Async chunks
Distributable file count
History
To update your PR or re-run it, just comment with: |
* [ML] Additional job spaces initialization * adding logs test * updating integrations * updating test text * fixing logs jobs error * fix bug with duplicate ids * updating initialization log text * fixing initialization text * adding metrics overrides Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Adds ability to allocate spaces for job when initialising existing jobs which do not have a saved object associated to them.
Normal behaviour is to put all existing jobs into the
*
space. However Logs jobs should be assigned to the space which exists in their job ID.Adds an
applyToAllSpaces
override flag to the modules setup endpoint. This will place all jobs in the module into the*
space.Integrations
APM, Uptime and Security
module setup calls are passed the
applyToAllSpaces
flag so all jobs created will exist in the*
space.As long as the user pressing the button has permission to assign saved objects to the
*
space.Logs
When creating ML jobs through the Logs UI, the jobs are created in whatever space is currently being used.
During initialisation, all existing jobs in the
logs-ui
group will be assigned to their correct space based on the job ID.e.g.
my_space
space forkibana-logs-ui-my_space-default-log-entry-rate
Also fixes bug where an AD job and a DFA job cannot have the same ID.
Documentation was added for features that require explanation or tutorials
Unit or functional tests were updated or added to match the most common scenarios
This was checked for breaking API changes and was labeled appropriately