Skip to content
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] Add delete annotations option to delete and reset job modals #147537

Conversation

jgowdyelastic
Copy link
Member

@jgowdyelastic jgowdyelastic commented Dec 14, 2022

Adds a switch to the delete and reset job modals to tell elasticsearch to also delete any user created annotations when deleting or reseting the job.

Delete job
image

Reset job
image

Closes #145756

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to add a functional test to check the behaviour here, such as recreating a job after deleting / not deleting annotations and seeing if a user annotation was present on the recreated job.

label={i18n.translate(
'xpack.ml.jobsList.deleteJobModal.deleteUserAnnotations',
{
defaultMessage: 'Also delete annotations.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the text we have in the modal when deleting DFA jobs, maybe this could just be Delete annotations ?

<EuiSpacer />
<EuiSwitch
label={i18n.translate('xpack.ml.jobsList.resetJobModal.deleteUserAnnotations', {
defaultMessage: 'Also delete annotations.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the text we have in the modal when deleting DFA jobs, maybe this could just be Delete annotations ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Text updated in 256bd0e
Added functional tests in 9366e4c

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the comments about the copy from @peteharverson - LGTM ⚡

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
ml 3.4MB 3.4MB +661.0B
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 61 67 +6
ml 566 564 -2
osquery 109 115 +6
securitySolution 439 445 +6
total +18

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 70 76 +6
ml 569 567 -2
osquery 110 117 +7
securitySolution 516 522 +6
total +19

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jgowdyelastic

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the functional tests! LGTM

@jgowdyelastic jgowdyelastic merged commit 090fa5d into elastic:main Dec 21, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Dec 21, 2022
crespocarlos pushed a commit to crespocarlos/kibana that referenced this pull request Dec 23, 2022
…astic#147537)

Adds a switch to the delete and reset job modals to tell elasticsearch
to also delete any user created annotations when deleting or reseting
the job.


**Delete job**

![image](https://user-images.githubusercontent.com/22172091/207633225-714a0f13-b401-4921-8175-fabcf5da734b.png)

**Reset job**

![image](https://user-images.githubusercontent.com/22172091/207633276-d7a1ef6c-ef5e-4b26-8df3-7be57626e8f6.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting enhancement New value added to drive a business result Feature:Anomaly Detection ML anomaly detection :ml release_note:enhancement v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] Add support for new delete_user_annotations parameter for reset & delete job APIs
5 participants