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 not blocking forced downgrades/installation if cannot delete indices #159814
[ML] Fix not blocking forced downgrades/installation if cannot delete indices #159814
Conversation
b0f209a
to
806ecb4
Compare
…ocking-downgrades
Pinging @elastic/ml-ui (:ml) |
Pinging @elastic/fleet (Team:Fleet) |
{ transform_id: transformId }, | ||
{ ignore: [404] } | ||
); | ||
await esClient.transform.getTransform({ transform_id: transformId }, { ignore: [404] }); |
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.
What the point of that call now? as we ignore 404 it seems to check the transform exists
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.
Great catch! Removed here 656dd9d
(#159814)
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.
One small questions but otherwise LGTM 🚀
656dd9d
to
431f516
Compare
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @qn895 |
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 ⚡
… indices (elastic#159814) (cherry picked from commit 7686163)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Summary
Currently, doing a forced downgrade of a package requires deletion of the transform's destination index. However, it's possible that the kibana_system user does not have sufficient permission to do the deletion of the index for certain indices.
This PR uses the new parameter to also enable deletion . With this change, the destination index is deleted together with the transform regardless of whether the destination index was created by the transform or by the user.
Before:
Example 1 (Dest index is a system index. Does not fail for reinstallation)
Screen.Recording.2023-06-20.at.13.15.48.mov
Example 2 (Dest index is a not system index. Fail for reinstallation)
Screen.Recording.2023-06-20.at.13.20.02.mov
After:
Example 1 (Dest index is a system index. Does not fail for reinstallation)
Screen.Recording.2023-06-20.at.13.23.47.mov
Example 2 (Dest index is a not system index. Does not fail for reinstallation)
Screen.Recording.2023-06-20.at.14.56.17.mov
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers