[SREP-3734] Fix retryer exponential backoff using XOR instead of exponentiation#3210
[SREP-3734] Fix retryer exponential backoff using XOR instead of exponentiation#3210smarthall wants to merge 1 commit intoopenshift:mainfrom
Conversation
In Go, ^ is the XOR operator, not exponentiation. The expression 2^attempts produced incorrect sleep durations (2s, 3s, 0s, 1s) instead of the intended exponential backoff (1s, 2s, 4s, 8s). Use bit shift (1<<attempts) instead. Signed-off-by: Daniel Hall <danhall@redhat.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
There are test jobs defined for this repository which are not configured to run automatically. Comment |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: smarthall The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/pipeline required |
|
Scheduling required tests: |
|
/retest |
|
@smarthall: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
^is the bitwise XOR operator, not exponentiation. The expression2^attemptsproduced incorrect sleep durations (2s, 3s, 0s, 1s) instead of the intended exponential backoff (1s, 2s, 4s, 8s).2^attemptswith1<<attempts(bit shift) to produce correct powers of 2.Test plan
🤖 Generated with Claude Code