Skip to content

fix: isLastAttempt on error handler correct if max attempt 0 #1595

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

Merged
merged 5 commits into from
Nov 11, 2022

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Nov 9, 2022

No description provided.

@csviri
Copy link
Collaborator Author

csviri commented Nov 9, 2022

closes #1395


ReconciliationDispatcher(Controller<P> controller,
CustomResourceFacade<P> customResourceFacade) {
this.controller = controller;
this.customResourceFacade = customResourceFacade;

var retry = controller.getConfiguration().getRetry();
retryConfigurationHasZeroAttempts = retry == null || retry.initExecution().isLastAttempt();
Copy link
Contributor

Choose a reason for hiding this comment

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

Great. Didn't think of calling it in the ctor. I was convince that it would only work in a reconciliation context. LGTM

csviri and others added 4 commits November 10, 2022 14:37
…tor/processing/event/ReconciliationDispatcher.java

Co-authored-by: Chris Laprun <[email protected]>
@sonarqubecloud
Copy link

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

75.0% 75.0% Coverage
0.0% 0.0% Duplication

@csviri csviri merged commit bb3a8c3 into main Nov 11, 2022
@csviri csviri deleted the error-handler-retry-fix branch November 11, 2022 07:32
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.

isLastAttempt() is false on the single call to handle error when max-attempts is zero
3 participants