test/e2e: add default 60s backoff for 429 without Retry-After header - #631
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe Gangway bridge now waits 60 seconds when HTTP 429 responses lack a valid ChangesGangway rate-limit handling
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to 429 responses without a valid Retry-After value now wait 60 seconds before retrying, without adding a second retry delay. The change is ready to merge. Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@redhat-chai-bot: 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. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dustman9000, redhat-chai-bot The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
Add a default 60-second backoff in the gangway-bridge template's 429 rate-limit handler when no valid
Retry-Afterheader is present. This prevents the script from immediately falling through to the outer retry loop with only the base exponential backoff, which can be too short to survive rate limit windows.Problem
When the Gangway API returns HTTP 429 without a
Retry-Afterheader, the script's 429 handler logs the event but does no waiting at all -- it returns immediately to the outer retry loop. The outer loop then applies its own exponential backoff (starting at 30s), but:MAX_RETRIES=1(as configured in SAPM), this gives only one 30s wait before exhausting all attemptsRATE_LIMITED_WAITEDflag is never set, so the outer loop's backoff is always applied on top (instead of being skipped)Changes
In the
elsebranch of the Retry-After header check (bothboilerplate/openshift/golang-osd-e2e/gangway-bridge-template.ymlandtest/e2e/gangway-bridge-template.yml):sleep 60-- a reasonable default wait when no Retry-After header is availableRATE_LIMITED_WAITED=1-- signals the outer retry loop to skip its own backoff (avoiding double-waiting)Note on boilerplate
Both the boilerplate source (
boilerplate/openshift/golang-osd-e2e/gangway-bridge-template.yml) and the generated output (test/e2e/gangway-bridge-template.yml) are updated in this PR. The true upstream is theopenshift/boilerplaterepository -- a parallel change there may be needed to prevent this fix from being overwritten on the next boilerplate sync.AI-generated. Review for accuracy.
@dustman9000 requested in Slack thread
Summary by CodeRabbit