-
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] Fix deletion of models that are not used by pipelines #114107
[ML] Fix deletion of models that are not used by pipelines #114107
Conversation
Pinging @elastic/ml-ui (:ml) |
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.
Tested the UI fix and it worked fine.
Great to see the functional tests coming! 🎉
Left a few comments.
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 ⚡
⏳ Build in-progress, with failures
Failed CI StepsHistory
To update your PR or re-run it, just comment with: |
Checking test stability in a flaky test runner job ... no failures in 50 runs ✔️ |
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
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
…14107) * [ML] Fix deletion of models that are not used by pipelines * [ML] Edits from review * [ML] Fix jest test for index switch in delete job modal * [ML] Fix API test calls to createTestTrainedModels * [ML] Remove unnecessary async from jest test
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…114355) * [ML] Fix deletion of models that are not used by pipelines * [ML] Edits from review * [ML] Fix jest test for index switch in delete job modal * [ML] Fix API test calls to createTestTrainedModels * [ML] Remove unnecessary async from jest test Co-authored-by: Pete Harverson <[email protected]>
Summary
Fixes #113013 where trained models that weren't in use by a pipeline could not be selected for deletion in the models list in the data frame analytics page as the delete action and selection checkboxes were incorrectly disabled.
This was caused by a regression introduced in #99174, which meant that an empty
pipelines
object is returned by the/api/ml/trained_models/:modelId
endpoint for models not used by pipelines, where beforenull
was returned.Also adds extra functional tests for the trained models list, which would have caught the original bug, and fixes an error in
use_delete_action.tsx
in the return value foruserCanDelete
.Checklist
Fixes #113013