Skip to content

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

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

Closed
scrocquesel opened this issue Aug 11, 2022 · 6 comments · Fixed by #1595
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@scrocquesel
Copy link
Contributor

Bug Report

To track the issue raised by quarkiverse/quarkus-operator-sdk#380

@scrocquesel
Copy link
Contributor Author

The problem is that the first reconcile loop has no information from the RetryConfiguration if the builded RetryInfo will actually provide a nextDelay.

As it seems that retryConfiguration cannot be null (there is always a default one), Instead of

@Override
public boolean isLastAttempt() {
  return controller.getConfiguration().getRetryConfiguration() == null;
}

may be something like

@Override
public boolean isLastAttempt() {
  return controller.getConfiguration().getRetryConfiguration().isActive()l;
}

The GenericRetryConfiguration may return false when max-attemps is 0.

@csviri
Copy link
Collaborator

csviri commented Aug 22, 2022

I think it should be rather nullable, thus controller.getConfiguration().getRetryConfiguration() should return an Optional?

That is better describing the domain, that there might not be a retry.

@scrocquesel
Copy link
Contributor Author

I think it should be rather nullable, thus controller.getConfiguration().getRetryConfiguration() should return an Optional?

That is better describing the domain, that there might not be a retry.

It means that the configuration process is aware of why a given config for a given implementation would not produce a retry so it can set an empty RetryConfiguration instead of the given config/implementation.

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 27, 2022
@csviri csviri removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 27, 2022
@csviri csviri added this to the 4.2 milestone Oct 31, 2022
@csviri csviri self-assigned this Oct 31, 2022
@csviri
Copy link
Collaborator

csviri commented Nov 9, 2022

@scrocquesel fixed this here: #1595 pls take a look if you have some time.

it is quite simple this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment