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

chore: use IsZero() for ctr.Result to make check #662

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Conversation

programmer04
Copy link
Member

@programmer04 programmer04 commented Sep 27, 2024

What this PR does / why we need it

During the review of #476 @pmalek mentioned that for ctrl.Result not only the field Requeue but also RequeueAfter indicates a need of requeue see #476 (comment). This PR ensures that both fields are checked in all cases with a built-in method IsZero().

Which issue this PR fixes

Spotted during the review of PR for the issue #380

@programmer04 programmer04 added enhancement New feature or request area/maintenance labels Sep 27, 2024
@programmer04 programmer04 added this to the KGO v1.4.x milestone Sep 27, 2024
@programmer04 programmer04 self-assigned this Sep 27, 2024
@programmer04 programmer04 requested a review from a team as a code owner September 27, 2024 10:54
@programmer04 programmer04 enabled auto-merge (squash) September 27, 2024 10:54
Copy link
Contributor

@czeslavo czeslavo left a comment

Choose a reason for hiding this comment

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

Wouldn't !res.IsZero() be the equivalent?

@programmer04 programmer04 changed the title chore: introduce ShouldRequeue to provide robust check chore: use IsZero() for ctr.Result to make check Sep 27, 2024
@programmer04 programmer04 merged commit dac3ccc into main Sep 27, 2024
21 checks passed
@programmer04 programmer04 deleted the requeue-check branch September 27, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maintenance enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants