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

[Transform] improve irrecoverable error detection - part 2 #52003

Conversation

hendrikmuhs
Copy link
Contributor

base error handling on rest status instead of listing individual exception types

relates to #51820

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml/Transform)

@hendrikmuhs
Copy link
Contributor Author

run elasticsearch-ci/bwc
run elasticsearch-ci/default-distro

@hendrikmuhs hendrikmuhs force-pushed the transform-error-handling-using-rest-status branch from 4dc601e to f8a1d01 Compare February 7, 2020 09:33
@przemekwitek przemekwitek self-requested a review February 12, 2020 07:12
@hendrikmuhs hendrikmuhs force-pushed the transform-error-handling-using-rest-status branch from f8a1d01 to 1b1505b Compare February 12, 2020 10:04
Copy link
Contributor

@przemekwitek przemekwitek left a comment

Choose a reason for hiding this comment

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

LGTM

private static void assertFirstException(Collection<BulkItemResponse> bulkItemResponses, Class<?> expectedClass, String message) {
Throwable t = ExceptionRootCauseFinder.getFirstIrrecoverableExceptionFromBulkResponses(bulkItemResponses);
assertNotNull(t);
assertEquals(t.getClass(), expectedClass);
Copy link
Contributor

Choose a reason for hiding this comment

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

assertThat(..., equalTo(...))
?

@hendrikmuhs hendrikmuhs merged commit 6ace2ef into elastic:master Feb 12, 2020
@hendrikmuhs hendrikmuhs deleted the transform-error-handling-using-rest-status branch February 12, 2020 13:17
hendrikmuhs pushed a commit that referenced this pull request Feb 12, 2020
base error handling on rest status instead of listing individual exception types

relates to #51820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants