Skip to content

fix(gax): abort stalled REST fallback fetches#7949

Open
akshatbaranwal wants to merge 1 commit intogoogleapis:mainfrom
akshatbaranwal:fix/rest-fallback-deadline-cancel-upstream
Open

fix(gax): abort stalled REST fallback fetches#7949
akshatbaranwal wants to merge 1 commit intogoogleapis:mainfrom
akshatbaranwal:fix/rest-fallback-deadline-cancel-upstream

Conversation

@akshatbaranwal
Copy link
Copy Markdown

Summary

  • treat the second REST fallback stub argument as metadata headers and the third as call options
  • wire deadline to an actual abort timer for REST fallback fetches
  • make server-stream cancel() abort the underlying fetch instead of only the parser-owned controller
  • add regression coverage for unary deadline abort, server-stream deadline abort, and server-stream cancel

Why

In REST fallback mode, server-streaming reads can silently stall after fetch dispatch but before the first response byte. Before this change:

  • the generic timeout wrapper populated the third argument, but the fallback stub only read the second
  • server-stream cancel() aborted the parser-owned controller, not the fetch-owned controller

That combination leaves stalled REST fallback fetches effectively unbounded and uncancellable.

Testing

  • cd core/packages/gax && npm run compile
  • cd core/packages/gax && npx mocha build/test/unit/grpc-fallback.js

@akshatbaranwal akshatbaranwal requested a review from a team as a code owner April 2, 2026 20:33
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