Skip to content

[8.6][ML Inference] Verify pipeline usage before deletion#144053

Merged
demjened merged 52 commits intoelastic:mainfrom
demjened:demjened/validate-pipeline-usage
Oct 28, 2022
Merged

[8.6][ML Inference] Verify pipeline usage before deletion#144053
demjened merged 52 commits intoelastic:mainfrom
demjened:demjened/validate-pipeline-usage

Conversation

@demjened
Copy link
Contributor

@demjened demjened commented Oct 26, 2022

Summary

This PR adds a check to the DELETE /internal/enterprise_search/indices/{indexName}/ml_inference/pipeline_processors/{pipelineName} endpoint. Before deleting the supplied ML inference processor pipeline from the given index, we check whether the same pipeline is referenced in a different index (or more precisely, in the {other_index_name}@ml-inference managed pipeline).

Manual testing

ml-inference-ner2 is referenced in two indices' managed pipelines:
Screen Shot 2022-10-26 at 14 20 01
Screen Shot 2022-10-26 at 14 20 20

Deleting the ml-inference-ner3 pipeline succeeds

Screen Shot 2022-10-26 at 14 20 41

Deleting the ml-inference-ner2 pipeline fails

Screen Shot 2022-10-27 at 15 09 42

Checklist

demjened and others added 30 commits September 13, 2022 13:47
@demjened demjened added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:EnterpriseSearch v8.6.0 labels Oct 26, 2022
@demjened demjened marked this pull request as ready for review October 26, 2022 18:34
@demjened demjened requested a review from a team October 26, 2022 18:34
Copy link
Contributor

@brianmcgue brianmcgue left a comment

Choose a reason for hiding this comment

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

A few comments/questions, but overall, LGTM

@demjened demjened force-pushed the demjened/validate-pipeline-usage branch 2 times, most recently from 9a9247a to fbb10bf Compare October 28, 2022 16:20
@demjened demjened force-pushed the demjened/validate-pipeline-usage branch from fbb10bf to 5843600 Compare October 28, 2022 16:20
@demjened demjened force-pushed the demjened/validate-pipeline-usage branch from 5843600 to e86622a Compare October 28, 2022 17:53
@kibana-ci
Copy link

💚 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
enterpriseSearch 1.7MB 1.7MB +42.0B

History

  • 💔 Build #83612 failed 58436000024fd987305034ffe7d0d7c21c0826fb
  • 💔 Build #83569 failed 9a9247a9254414a8a80a4d449a69d843e06ab12a
  • 💔 Build #83336 failed 94afd27682519225661e634c4dfad2e582dd23a1
  • 💔 Build #83329 failed f52568e79e945f354342573ad325975a97055590
  • 💚 Build #82931 succeeded 66d007aba669d5cceb02a724ad0631eb0776cc7b

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

@demjened demjened merged commit 7671176 into elastic:main Oct 28, 2022
@demjened demjened deleted the demjened/validate-pipeline-usage branch October 28, 2022 20:13
jloleysens added a commit to jloleysens/kibana that referenced this pull request Oct 31, 2022
* main: (41 commits)
  [api-docs] Daily api_docs build (elastic#144212)
  Add readonly view to role management (elastic#143893)
  [api-docs] Daily api_docs build (elastic#144208)
  [APM] Adds button group to navigate to "All services" (elastic#142911)
  Update react-query to ^4.12.0 (main) (elastic#139986)
  [APM] Support specific fields when creating service groups (elastic#142201) (elastic#143881)
  [api-docs] Daily api_docs build (elastic#144203)
  [ts] add stub index.d.ts in @kbn/ui-shared-deps-npm
  [Synthetics] Fix failing Synthetics Integration test (elastic#144175)
  chore(NA): remove @types/pkg link creation when generating a new package (elastic#144200)
  [Osquery] Update schema to v5.5.1 (elastic#144090)
  [ci] remove github-checks-reporter (elastic#144193)
  [8.6][ML Inference] Verify pipeline usage before deletion (elastic#144053)
  [ts] ts refs cache was removed, remove capture task
  Added Rollups CCS Test (elastic#144074)
  [auto] migrate existing plugin/package configs
  [ts] stop building @types packages in bootstrap
  skip failing test suite (elastic#142762)
  skip failing test suite (elastic#144186)
  [Fleet] Show Add Fleet Server instead of add agent when adding agent from agent policy (elastic#144105)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:EnterpriseSearch v8.6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants