Skip to content

Move timeout formatting to header - #4

Merged
samuel-williams-shopify merged 2 commits into
mainfrom
timeout-header-formatting
Aug 13, 2026
Merged

Move timeout formatting to header#4
samuel-williams-shopify merged 2 commits into
mainfrom
timeout-header-formatting

Conversation

@samuel-williams-shopify

Copy link
Copy Markdown
Contributor

Motivation

Timeout serialization belongs with the typed grpc-timeout header rather than the general Protocol::GRPC::Methods utility namespace.

Changes

  • add Protocol::GRPC::Header::Timeout.format for encoding durations
  • keep parsing on Protocol::GRPC::Header::Timeout#to_seconds
  • make numeric header coercion use Timeout.format directly
  • retain Methods.format_timeout and Methods.parse_timeout as deprecated compatibility shims
  • remove the dependency from Header::Timeout back to Methods
  • add focused timeout-header tests and an unreleased note

Deprecated methods emit warnings only when $VERBOSE is enabled, following the existing project convention.

Verification

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

@samuel-williams-shopify
samuel-williams-shopify merged commit 174a235 into main Aug 13, 2026
36 of 40 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the timeout-header-formatting branch August 13, 2026 07:16
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