-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Treat HttpClient timeouts the same as Hystrix timeouts #555
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
Treat HttpClient timeouts the same as Hystrix timeouts #555
Conversation
d41cd19 to
2419175
Compare
Codecov Report
@@ Coverage Diff @@
## 2.0.x #555 +/- ##
============================================
+ Coverage 70.51% 70.52% +0.01%
- Complexity 908 910 +2
============================================
Files 128 128
Lines 3646 3651 +5
Branches 256 258 +2
============================================
+ Hits 2571 2575 +4
+ Misses 943 941 -2
- Partials 132 135 +3
Continue to review full report at Codecov.
|
|
The failure looks like an unrelated failure, and for my local executions is broken also in The tests affected by this change are fine though:
|
2419175 to
6b1adda
Compare
|
@mmanciop can you rebase? We're trying to release week after next. |
6b1adda to
444355e
Compare
|
On my machine the builds fail with an seemingly-unrelated redis rate-limit failure, but the Hystrix-related tests pass. |
|
Do you have a redis server running on you machine during your build? |
|
No, I have not. This kind of the dependency would be however rather easy to automate with https://github.com/kstyrc/embedded-redis. I think I either have made a quick JUnit rule in the past for it, or used an existing one. I’ll consider contributing the solution to avoid this pitfall woth another PR. |
|
@mmanciop can you rebase? |
444355e to
0f6d39c
Compare
|
Done. I found out that, due to #558, we have now another case to deal with; so I am wondering if in #558 we dealt with the mapping from Wouldn't it make sense to declare In any case, I believe it makes sense to let |
|
Meanwhile, I found out [1] that So I think this commit is good for the time being. [1] https://github.com/mmanciop/response-status-repro.git |
|
So, the Spring Cloud Gateway ignores |
|
About |
| Throwable cause = e.getCause(); | ||
|
|
||
| if (cause instanceof ResponseStatusException) { | ||
| /* |
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.
When spring-projects/spring-boot#14742 is fixed upstream, here we should add support for @ResponseStatus using a logic similar to the one of WebFluxResponseStatusExceptionHandler
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.
Fundamentally, the condition would change to:
cause instanceof ResponseStatusException || AnnotatedElementUtils.hasAnnotation(cause.getClass(), ResponseStatus.class)
| return Mono.error(cause); | ||
| } | ||
|
|
||
| if (cause instanceof TimeoutException) { |
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.
When spring-projects/spring-boot#14742 is fixed upstream, we can just add @ResponseStatus to TimeoutException and let the previous case (amended as per comment) take care of propagating the cause outside.
|
Makes sense to me |
|
As per spring-projects/spring-boot#14744, upstream should be fixed with 2.0.6. What is the timeline to update to a new Spring Boot Release after it becomes available? |
|
@spencergibb I guess the label “waiting for feeback” should be removed :-) |
|
It looks like 2.0.6 is scheduled to be released on Oct 16th. There is a chance we might be able to do the Finchley.SR2 release based on that release. It all depends on when we get through the last few issues in our queue. |
|
@mmanciop we should now be using Boot 2.0.6 that was released today. We are planning on doing a release soon (probably by the end of the week), so if you update the PR soon to leverage |
0f6d39c to
be17f21
Compare
be17f21 to
d6be3eb
Compare
|
The tests failing in this build are failing for me also for the tip of |
|
@mmanciop the build should be fixed, can you pull in the latest changes into your branch? |
* Treat HttpClient timeouts the same as Hystrix timeouts * Propagate ResponseStatusException and throwables with @ResponseStatus when cause for COMMAND_EXECUTION failure Fix spring-cloud#554
d6be3eb to
0276702
Compare
|
@ryanjbaxter done ;-) Thanks for fixing the build. |
Fix #554