Skip to content

Fix gRPC timeout precision and metadata interoperability - #17

Merged
samuel-williams-shopify merged 3 commits into
mainfrom
fix-grpc-interoperability
Sep 24, 2026
Merged

samuel-williams-shopify merged 3 commits into
mainfrom
fix-grpc-interoperability

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Timeout serialization currently turns 90 seconds into 1M, binary metadata rejects valid unpadded base64, and error responses disclose server backtraces by default. Preserve timeout precision (rounding upward within the eight-digit limit), accept padded/unpadded metadata while retaining strict validation, and require backtrace: true to serialize backtraces.

Binary metadata decoding accepts the standard Base64 alphabet with either correct padding or no padding. Partial padding, URL-safe characters, whitespace, and invalid pad bits are rejected. Only unpadded values that need padding allocate a padded input copy.

Also default request metadata to application/grpc and add the HTTP-to-gRPC fallback status mapping needed by the dependent client fixes. Existing explicit codec content types remain supported.

Fixes #14.
Fixes #15.
Fixes #16.
Related: socketry/async-grpc-compatible#2, socketry/async-grpc-compatible#3, socketry/async-grpc-compatible#4.

Issue #14's body currently describes GAPIC integration instead of timeouts; the timeout fix follows its title and the reproduced serialization behavior.

Validation: COVERAGE=PartialSummary bundle exec bake test (227 tests, 451 assertions; 100% line coverage), bundle exec rubocop, and bundle exec bake decode:index:coverage lib (103/103 public definitions). Tested locally on Ruby 4.0.7, including the dependent async-grpc and compatibility worktrees. The backtrace default change is documented under Unreleased.

Dependent client PRs: socketry/async-grpc#10 and socketry/async-grpc-compatible#7. Those drafts require this change to be merged and released before their dependency minimums can be finalized.

@samuel-williams-shopify
samuel-williams-shopify merged commit e1fd5e1 into main Sep 24, 2026
40 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the fix-grpc-interoperability branch September 24, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant