-
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] Transforms: Add ability to delete dest index & index pattern when deleting transform job #67922
Merged
qn895
merged 19 commits into
elastic:master
from
qn895:transform-delete-index-when-del-job
Jun 10, 2020
Merged
[ML] Transforms: Add ability to delete dest index & index pattern when deleting transform job #67922
Changes from 5 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9a72929
[Transform] Add ability to delete dest index & index pattern when del…
qn895 a9620c6
[Transform] Combine success messages when deleting job transforms
qn895 f2d672b
[Transform] Change preview text length to 50
qn895 1e6bd0c
[Transform] Add API integration tests for delete_transforms
qn895 b32b884
[Transform] Update tests and fix i18n duplicates
qn895 90a2d5e
[Transform] Update bulk delete messages
qn895 d87248d
[Transform] Update tests
qn895 d3c37b5
[Transform] Rename transform job -> transform, fix ts
qn895 ec3acd3
[Transform] Add await to userCanDelete callback
qn895 1269b1d
[Transform] Remove .toLowerCase check in getIP
qn895 47ec2cc
Merge remote-tracking branch 'upstream/master' into transform-delete-…
qn895 d8f901c
[Transform] Update tests to include waitForIndicesToExist
qn895 cd293f2
[Transform] Refactor delete transform schema
qn895 8e7b21a
[Transform] Add spacer, rename indices,
qn895 def2ccf
[Transform] Refactor new IndexService
qn895 d340b35
Merge remote-tracking branch 'upstream/master' into transform-delete-…
qn895 f2b70fb
[Transform] Extend MLResponseError in extractErrorMessage
qn895 a5fda7f
[Transform] Add unit tests extractErrorMessage and modify type defs
qn895 6f0fc96
[Transform] Refactor extractErrorMessage to account for boom responses
qn895 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,13 @@ export const extractErrorMessage = ( | |
return error.body.message?.msg; | ||
} | ||
} | ||
if (typeof error.body === 'object' && 'msg' in error.body) { | ||
// @ts-ignore | ||
if (typeof error.body.msg === 'string') { | ||
// @ts-ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would be great if you manage to avoid There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll do this an a follow up PR |
||
return error.body.msg; | ||
} | ||
} | ||
} | ||
return undefined; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this function contains plenty of
if
statements, worth to covert with unit tests and provide a better typingThere 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.
I'll do this an a follow up PR