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

feat(retry): disable retry for blocking exceptions #370

Merged
merged 7 commits into from
Dec 1, 2023

Conversation

pietro-tota
Copy link
Contributor

@pietro-tota pietro-tota commented Nov 29, 2023

List of Changes

Configured ignoreExceptions for resilience4j retry and circuit breaker in order to ignore retry for all of those exception that are blocking (such as TransactionNotFoundException) and for which a retry cannot make the original request succeed.

Motivation and Context

The original configuration ignores only exception related to Nodo response errors (NodoErrorException) so other errors are not ignored activating circuit breaker and retry logic.
This causes circuit breaker being opened and retry being performed also for request related errors (such as transaction not being found, or authorization request amount mismatch)

How Has This Been Tested?

Junit tests (checking for retry count and circuit breaker status) + local test using eCommerce local

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@pietro-tota pietro-tota marked this pull request as ready for review November 30, 2023 10:11
@pietro-tota pietro-tota requested a review from a team as a code owner November 30, 2023 10:11
Copy link
Contributor

@giovanniberti giovanniberti left a comment

Choose a reason for hiding this comment

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

Outstanding work 👏

Copy link

sonarqubecloud bot commented Dec 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@pietro-tota pietro-tota merged commit c430cb5 into main Dec 1, 2023
6 checks passed
@pietro-tota pietro-tota deleted the CHK-2192-resilience4j-retry-configuration branch December 1, 2023 10:22
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.

2 participants