Skip to content

fix(pipeline): REST fallback for GraphQL batch-level failures (502/timeout) - #64

Merged
rpothin merged 2 commits into
mainfrom
fix/batch-graphql-502-rest-fallback
May 12, 2026
Merged

fix(pipeline): REST fallback for GraphQL batch-level failures (502/timeout)#64
rpothin merged 2 commits into
mainfrom
fix/batch-graphql-502-rest-fallback

Conversation

@rpothin

@rpothin rpothin commented May 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • fall back to per-repo REST hydration when an entire GraphQL batch request fails
  • keep recording REST errors per repository so PAT-policy failures are still classified downstream
  • add regression coverage for successful REST fallback and REST fallback failure cases

Root cause

Large Microsoft org repositories can make the batched POST /graphql request fail at the transport level (for example 502 Bad Gateway or timeouts). The previous outer catch recorded that single batch error for every repo in the 20-repo batch, so all 20 became detailFailures and blocked the pipeline.

Fix

When the whole GraphQL batch throws, batchGetRepositoryDetails now falls back to getRepositoryDetails() for each repo in the batch. That isolates failures to the repos that truly fail under REST while allowing public repos to continue through the pipeline.

Validation

  • cd Pipeline && npm test
  • cd Pipeline && npm run typecheck

rpothin and others added 2 commits May 12, 2026 12:46
…02/timeout)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rpothin
rpothin merged commit cb1fd63 into main May 12, 2026
1 check passed
@rpothin
rpothin deleted the fix/batch-graphql-502-rest-fallback branch May 12, 2026 17:51
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