Skip to content

Catch and retry rate limited responses in read-only GraphQL queries#1531

Draft
synthead wants to merge 3 commits intomainfrom
handle-rate-limiting-in-graphql-queries
Draft

Catch and retry rate limited responses in read-only GraphQL queries#1531
synthead wants to merge 3 commits intomainfrom
handle-rate-limiting-in-graphql-queries

Conversation

@synthead
Copy link
Collaborator

@synthead synthead commented Mar 21, 2026

Closes https://github.ghe.com/github/octoshift/issues/11503!

This PR makes GraphQL queries include both general retries and rate limiting! This makes read-only GraphQL queries have the same robustness as other GET calls in the GEI CLI.

Demo

Here is a migration in progress, handling rate limiting:

[2026-03-20 17:09:48] [INFO] Creating Migration Source...
[2026-03-20 17:09:49] [INFO] Importing Archive...
[2026-03-20 17:09:49] [INFO] Migration in progress (ID: RM_kgDaACQ0M2E5ZGQzZS1kYTMwLTQ3MWItODU3Yi1mNTg5NmMyZmUyOGU). State: PENDING_VALIDATION. Waiting 60 seconds...
[2026-03-20 17:10:50] [WARNING] Secondary rate limit detected (attempt 1/3). Waiting 60 seconds before retrying...
[2026-03-20 17:11:50] [INFO] Migration in progress (ID: RM_kgDaACQ0M2E5ZGQzZS1kYTMwLTQ3MWItODU3Yi1mNTg5NmMyZmUyOGU). State: PENDING_VALIDATION. Waiting 60 seconds...
[2026-03-20 17:12:50] [INFO] Migration in progress (ID: RM_kgDaACQ0M2E5ZGQzZS1kYTMwLTQ3MWItODU3Yi1mNTg5NmMyZmUyOGU). State: PENDING_VALIDATION. Waiting 60 seconds...
[2026-03-20 17:13:50] [WARNING] Secondary rate limit detected (attempt 1/3). Waiting 60 seconds before retrying...
[2026-03-20 17:14:51] [INFO] Migration in progress (ID: RM_kgDaACQ0M2E5ZGQzZS1kYTMwLTQ3MWItODU3Yi1mNTg5NmMyZmUyOGU). State: PENDING_VALIDATION. Waiting 60 seconds...
[2026-03-20 17:15:51] [INFO] Migration in progress (ID: RM_kgDaACQ0M2E5ZGQzZS1kYTMwLTQ3MWItODU3Yi1mNTg5NmMyZmUyOGU). State: PENDING_VALIDATION. Waiting 60 seconds...
[2026-03-20 17:16:51] [WARNING] Secondary rate limit detected (attempt 1/3). Waiting 60 seconds before retrying...
[2026-03-20 17:17:51] [INFO] Migration in progress (ID: RM_kgDaACQ0M2E5ZGQzZS1kYTMwLTQ3MWItODU3Yi1mNTg5NmMyZmUyOGU). State: PENDING_VALIDATION. Waiting 60 seconds...
[2026-03-20 17:18:51] [INFO] Migration in progress (ID: RM_kgDaACQ0M2E5ZGQzZS1kYTMwLTQ3MWItODU3Yi1mNTg5NmMyZmUyOGU). State: PENDING_VALIDATION. Waiting 60 seconds...
  • Did you write/update appropriate tests
  • Release notes updated (if appropriate)
  • Appropriate logging output
  • Issue linked
  • Docs updated (or issue created)
  • New package licenses are added to ThirdPartyNotices.txt (if applicable)

@synthead synthead self-assigned this Mar 21, 2026
@synthead synthead changed the title Handle rate limiting in graphql queries Catch and retry rate limited responses in read-only GraphQL queries Mar 21, 2026
@github-actions
Copy link

Unit Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 9c0d243.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant