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

Adding basic Failsafe support #33

Closed

Conversation

kubamarchwicki
Copy link

@kubamarchwicki kubamarchwicki commented Apr 23, 2019

This PR intended to add Failsafe support to Spring Cloud Circuitbreaker. This closes #30

  • Creating failsafe module
  • Configurable RetryPolicy and CircuitBreaker
  • Add support for customizers

The Failsafe support is basic (similar to one based spring-retry template). Next step should include support for reactive extensions (with Async callbacks in Failsafe)

@codecov
Copy link

codecov bot commented Apr 23, 2019

Codecov Report

Merging #33 into master will increase coverage by 0.18%.
The diff coverage is 92.3%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #33      +/-   ##
============================================
+ Coverage      90.7%   90.88%   +0.18%     
- Complexity      110      125      +15     
============================================
  Files            24       28       +4     
  Lines           409      461      +52     
  Branches         10       10              
============================================
+ Hits            371      419      +48     
- Misses           27       31       +4     
  Partials         11       11
Impacted Files Coverage Δ Complexity Δ
...uitbreaker/failsafe/FailsafeAutoConfiguration.java 100% <100%> (ø) 2 <2> (?)
...ircuitbreaker/failsafe/FailsafeCircuitBreaker.java 100% <100%> (ø) 4 <4> (?)
...reaker/failsafe/FailsafeCircuitBreakerFactory.java 78.57% <78.57%> (ø) 5 <5> (?)
...circuitbreaker/failsafe/FailsafeConfigBuilder.java 95.83% <95.83%> (ø) 4 <4> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a32929a...c87d0f4. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Apr 23, 2019

Codecov Report

Merging #33 into master will increase coverage by 0.18%.
The diff coverage is 92.3%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #33      +/-   ##
============================================
+ Coverage      90.7%   90.88%   +0.18%     
- Complexity      110      125      +15     
============================================
  Files            24       28       +4     
  Lines           409      461      +52     
  Branches         10       10              
============================================
+ Hits            371      419      +48     
- Misses           27       31       +4     
  Partials         11       11
Impacted Files Coverage Δ Complexity Δ
...uitbreaker/failsafe/FailsafeAutoConfiguration.java 100% <100%> (ø) 2 <2> (?)
...ircuitbreaker/failsafe/FailsafeCircuitBreaker.java 100% <100%> (ø) 4 <4> (?)
...reaker/failsafe/FailsafeCircuitBreakerFactory.java 78.57% <78.57%> (ø) 5 <5> (?)
...circuitbreaker/failsafe/FailsafeConfigBuilder.java 95.83% <95.83%> (ø) 4 <4> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a32929a...c87d0f4. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 23, 2019

Codecov Report

Merging #33 into master will decrease coverage by 0.14%.
The diff coverage is 92.3%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #33      +/-   ##
============================================
- Coverage     91.63%   91.48%   -0.15%     
+ Complexity      128       68      -60     
============================================
  Files            28       15      -13     
  Lines           466      282     -184     
  Branches         10        4       -6     
============================================
- Hits            427      258     -169     
+ Misses           28       19       -9     
+ Partials         11        5       -6
Impacted Files Coverage Δ Complexity Δ
...eaker/resilience4j/Resilience4JCircuitBreaker.java 100% <ø> (ø) 4 <0> (ø) ⬇️
...breaker/springretry/SpringRetryCircuitBreaker.java 100% <ø> (ø) 4 <0> (ø) ⬇️
...uitbreaker/failsafe/FailsafeAutoConfiguration.java 100% <ø> (ø) 2 <0> (ø) ⬇️
...aker/springretry/SpringRetryAutoConfiguration.java 100% <ø> (ø) 2 <0> (ø) ⬇️
.../springretry/SpringRetryCircuitBreakerFactory.java 86.66% <ø> (ø) 6 <0> (ø) ⬇️
...reaker/failsafe/FailsafeCircuitBreakerFactory.java 100% <ø> (ø) 7 <0> (ø) ⬇️
...ircuitbreaker/failsafe/FailsafeCircuitBreaker.java 100% <ø> (ø) 5 <0> (ø) ⬇️
...circuitbreaker/failsafe/FailsafeConfigBuilder.java 95.83% <ø> (ø) 4 <0> (ø) ⬇️
...tbreaker/springretry/SpringRetryConfigBuilder.java 76.19% <ø> (ø) 3 <0> (ø) ⬇️
...esilience4j/Resilience4JCircuitBreakerFactory.java 84% <100%> (+0.66%) 8 <1> (+1) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2f7de8...bde461c. Read the comment docs.

@kubamarchwicki kubamarchwicki changed the title WIP: Adding Failsafe support Adding basic Failsafe support Apr 23, 2019
@ryanjbaxter
Copy link
Contributor

Please add some documentation

@kubamarchwicki
Copy link
Author

Catched up with documentation.

Copy link
Contributor

@ryanjbaxter ryanjbaxter left a comment

Choose a reason for hiding this comment

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

@kubamarchwicki you need to add the starter to the dependencies module

@ryanjbaxter
Copy link
Contributor

@kubamarchwicki we decided as a team that the best approach would be to create a separate module or project somewhere that adds this support. As a team we don't want to be responsible for maintaining the implementation at the moment. We did the same thing for the Sentinal implementation (which lives outside this project).

@kubamarchwicki
Copy link
Author

Thank you @ryanjbaxter for feedback. I'll follow the path of Sentinal :-)

@ryanjbaxter
Copy link
Contributor

@kubamarchwicki thanks! Please let us know when you have an implementation we would happily list it in our docs!

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

Successfully merging this pull request may close these issues.

Add Failsafe
2 participants