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] Improvements to job saved object sync #101899

Conversation

jgowdyelastic
Copy link
Member

@jgowdyelastic jgowdyelastic commented Jun 10, 2021

Improves the saved object synchronisation for ML Jobs when datafeeds have been added and removed manually in elasticsearch.

Specifically this scenario:

  • add job and datafeed manually to es
  • sync jobs
  • delete datafeed in es
  • add the datafeed again, but with a different name
  • sync jobs

Previously, after syncing the jobs in the last step, the old datafeed would be removed from the saved object but it would stay in a state where the new datafeed could not then be attached to the saved object with subsequent syncs.

With this fix, after the last step the old datafeed will be removed from the saved object, but the user will need to sync a second time to attach the new datafeed.

@jgowdyelastic
Copy link
Member Author

@elasticmachine merge upstream

@jgowdyelastic jgowdyelastic self-assigned this Jun 14, 2021
@jgowdyelastic jgowdyelastic added :ml auto-backport Deprecated - use backport:version if exact versions are needed Feature:Anomaly Detection ML anomaly detection review v7.14.0 v8.0.0 labels Jun 14, 2021
@jgowdyelastic jgowdyelastic marked this pull request as ready for review June 14, 2021 12:54
@jgowdyelastic jgowdyelastic requested a review from a team as a code owner June 14, 2021 12:54
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

Functional tests LGTM, just one suggestion.

x-pack/test/api_integration/apis/ml/saved_objects/sync.ts Outdated Show resolved Hide resolved
@jgowdyelastic jgowdyelastic added bug Fixes for quality problems that affect the customer experience release_note:fix labels Jun 14, 2021
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @jgowdyelastic

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.

LGTM ⚡

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.

Tested and LGTM

@jgowdyelastic jgowdyelastic merged commit ede8432 into elastic:master Jun 15, 2021
@jgowdyelastic jgowdyelastic deleted the improvements-to-ml-job-saved-object-sync branch June 15, 2021 13:10
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 15, 2021
* [ML] Improvements to job saved object sync

* refactor

* adding testsadding testsadding testsadding testsadding testsadding testsadding testsadding tests

* updating test label

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 15, 2021
* [ML] Improvements to job saved object sync

* refactor

* adding testsadding testsadding testsadding testsadding testsadding testsadding testsadding tests

* updating test label

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: James Gowdy <[email protected]>
cuff-links pushed a commit to cuff-links/kibana that referenced this pull request Jun 15, 2021
* [ML] Improvements to job saved object sync

* refactor

* adding testsadding testsadding testsadding testsadding testsadding testsadding testsadding tests

* updating test label

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed bug Fixes for quality problems that affect the customer experience Feature:Anomaly Detection ML anomaly detection :ml release_note:fix review v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants