-
Notifications
You must be signed in to change notification settings - Fork 286
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
Exception handler test coverage added #128
Merged
v1r3n
merged 5 commits into
conductor-oss:main
from
ivakoleva:fix-client-abort-exception-nested-in-closed-channel-exception
May 12, 2024
Merged
Exception handler test coverage added #128
v1r3n
merged 5 commits into
conductor-oss:main
from
ivakoleva:fix-client-abort-exception-nested-in-closed-channel-exception
May 12, 2024
Conversation
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
…lient Why: On Conductor server side, an exception gets raised `Failure in @ExceptionHandler com.netflix.conductor.rest.controllers.ApplicationExceptionMapper#handleAll(HttpServletRequest, Throwable)`. Cause is attempting to write while the client aborted the connection `org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe`, while the exception was wrapped in `ClosedChannelException`. What: Added a ClosedChannelException handler for such exceptions root caused by ClientAbortException. Testing done: Local run. Not trivial to emulate the issue in a test. Such a test may rely on timing out the client before server responded. Signed-off-by: Iva Avramova <ikoleva@vmware.com>
Full stack trace:
|
…lient Why: On Conductor server side, an exception gets raised `Failure in @ExceptionHandler com.netflix.conductor.rest.controllers.ApplicationExceptionMapper#handleAll(HttpServletRequest, Throwable)`. Cause is attempting to write while the client aborted the connection `org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe`, while the exception was nested in `ClosedChannelException`. What: Added a ClosedChannelException handler for exception chain containing ClientAbortException. Testing done: Local run. Not trivial to emulate the issue in a test. Such a test may rely on timing out the client before server responded. Signed-off-by: Iva Avramova <ikoleva@vmware.com>
manan164
approved these changes
Apr 15, 2024
Signed-off-by: Iva Avramova <ikoleva@vmware.com>
Signed-off-by: Iva Avramova <ikoleva@vmware.com>
ivakoleva
changed the title
Fix of exception handler trying to write response to a disconnected c…
Exception handler test coverage added
Apr 22, 2024
ivakoleva
commented
Apr 22, 2024
@@ -53,16 +53,7 @@ public class ApplicationExceptionMapper { | |||
EXCEPTION_STATUS_MAP.put(NoResourceFoundException.class, HttpStatus.NOT_FOUND); | |||
} | |||
|
|||
@ExceptionHandler(ClientAbortException.class) |
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.
Reverted my prev change - I believe we should rather ignore it from alerts than changing the error logs here or something.
Added test coverage for the existing exception handler.
v1r3n
approved these changes
May 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…lient
Pull Request type
Spotless.
Changes in this PR
Why:
Ignoring a particular exception based on its stack trace should be rather an alerting config concern.
What:
Reverted ClientAbortedException specific handler.
Added test coverage for the existing exception handler.
Testing done: local run
Alternatives considered