-
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] Improving existing job check in anomaly detection wizard #87674
[ML] Improving existing job check in anomaly detection wizard #87674
Conversation
@elasticmachine merge upstream |
Pinging @elastic/ml-ui (:ml) |
@elasticmachine merge upstream |
When logged into a non-Default space, I am seeing this error in the server console when typing in an ID which exists only in the Default space (Single metric job wizard): And in the network tab I see:
|
x-pack/plugins/ml/public/application/jobs/new_job/common/job_validator/job_validator.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/jobs/new_job/common/job_validator/validators.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/jobs/new_job/common/job_validator/validators.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/jobs/new_job/common/job_validator/validators.ts
Outdated
Show resolved
Hide resolved
const message = | ||
jobValidator.groupIds.message === undefined | ||
? jobValidator.latestValidationResult.groupIdsExist?.message | ||
: jobValidator.groupIds.message; |
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.
const message = | |
jobValidator.groupIds.message === undefined | |
? jobValidator.latestValidationResult.groupIdsExist?.message | |
: jobValidator.groupIds.message; | |
const message = jobValidator.groupIds.message ?? jobValidator.latestValidationResult.groupIdsExist?.message; |
...pplication/jobs/new_job/pages/components/job_details_step/components/groups/groups_input.tsx
Outdated
Show resolved
Hide resolved
...pplication/jobs/new_job/pages/components/job_details_step/components/job_id/job_id_input.tsx
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
…s' of github.com:jgowdyelastic/kibana into improving-existing-job-jobs-in-anomaly-detection-wizards
added group id check to the edit job flyout in 6029c11 It is also possible to add a group using the multi-select controls in the jobs list. I think the current behaviour is acceptable. Jobs in the current space are checked for duplication but if you attempt to add a group which already exists as a job id in a different space, when you try to apply the changes a toast is displayed. |
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.
Code LGTM, just one small suggestion
x-pack/plugins/ml/public/application/jobs/new_job/common/job_validator/validators.ts
Outdated
Show resolved
Hide resolved
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 latest changes and LGTM
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
…c#87674) * [ML] Improving existing job check in anomaly detection wizard * fixing job id validation * allow group ids to be reused * updating module exists endpoint * fixing issuse with job without group list * fixing test and translation ids * fixing validator when model plot is disabled * changes based on review * adding group id check to edit job flyout * small refactor and fixing edit job issue Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
#88457) * [ML] Improving existing job check in anomaly detection wizard * fixing job id validation * allow group ids to be reused * updating module exists endpoint * fixing issuse with job without group list * fixing test and translation ids * fixing validator when model plot is disabled * changes based on review * adding group id check to edit job flyout * small refactor and fixing edit job issue Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
The new job wizards for anomaly detection jobs now use the
/api/ml/jobs/jobs_exist
endpoint as the user is typing, rather than using a preloaded list of existing jobs.When entering a job ID, a user cannot use a job or group ID that has already been used in any space.
When entering a group ID, the user cannot use an ID that has been used as a job ID in any space. Reusing a group ID is fine as it'll just add the new job to the existing group.
Checklist
Delete any items that are not applicable to this PR.
For maintainers