Skip to content

gcp: retry transient quota limit errors - #10735

Draft
not-stbenjam wants to merge 1 commit into
openshift:mainfrom
not-stbenjam:agent/gcp-quota-retry
Draft

gcp: retry transient quota limit errors#10735
not-stbenjam wants to merge 1 commit into
openshift:mainfrom
not-stbenjam:agent/gcp-quota-retry

Conversation

@not-stbenjam

Copy link
Copy Markdown

Summary

  • retry GCP Service Usage quota reads after HTTP 429 and 5xx responses
  • stop after five attempts and honor context cancellation
  • discard partial pagination results before a retry

Why

Eight of ten child runs in one OpenShift 5.0 aggregated GCP upgrade job failed in Platform Quota Check when Service Usage returned HTTP 503 backendError. The installer exited before product tests. A representative run is 2043664734464512000. The aggregated parent shows the cohort.

The change does not alter quota decisions. It retries only transient transport responses.

Testing

  • CGO_ENABLED=0 GOTOOLCHAIN=auto go test ./pkg/quota/gcp
  • CGO_ENABLED=0 GOTOOLCHAIN=auto go vet ./pkg/quota/gcp
  • git diff --check

Retry GCP Service Usage quota reads after rate-limit and server errors. Keep partial pagination results local to each attempt so a restart cannot duplicate limits.

Signed-off-by: Stephen Benjamin <stbenjam+ai@redhat.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 1, 2026
@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: a1c5c4c9-43d8-43df-ab01-01ed38224246

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 1, 2026
@openshift-ci

openshift-ci Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Hi @not-stbenjam. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@openshift-ci

openshift-ci Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign patrickdillon for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@patrickdillon

Copy link
Copy Markdown
Contributor

Quota failures are supposed to be. non-fatal. Specifically, if users are not authorized we gracefully ignore the error.

Instead of adding retry options, it could be simpler to just extend the skip, so we ignore 429 or 500:

https://github.com/not-stbenjam/installer/blob/5f2b0d3dc3edc1cd6802d210906841ac630f67f2/pkg/asset/quota/quota.go#L122

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants