Skip to content

Expose gRPC call timeout - #3

Merged
ioquatix merged 2 commits into
mainfrom
call-timeout-accessor
Aug 13, 2026
Merged

Expose gRPC call timeout#3
ioquatix merged 2 commits into
mainfrom
call-timeout-accessor

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Motivation

Middleware and service handlers may need to log the client-supplied gRPC timeout. Currently they must reach into the underlying request headers and parse grpc-timeout themselves.

Changes

  • add Protocol::GRPC::Call#timeout
  • return the client-supplied timeout normalized to seconds, or nil when absent
  • use the typed grpc-timeout header established by the gRPC header policy
  • document the accessor in the unreleased notes

This keeps Call#deadline as the runtime deadline and Call#time_remaining as the current remaining budget, while Call#timeout exposes the original requested duration.

Verification

  • bundle exec bake test (179 tests, 333 assertions)
  • bundle exec rubocop
  • bundle exec bake decode:index:coverage lib

@ioquatix
ioquatix merged commit 170f64e into main Aug 13, 2026
36 of 40 checks passed
@ioquatix
ioquatix deleted the call-timeout-accessor branch August 13, 2026 00:27
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.

2 participants