googleapis / gax-ruby

Google API Extensions for Ruby
https://rubygems.org/gems/google-gax
BSD 3-Clause "New" or "Revised" License
20 stars 22 forks source link

Per-method timeouts from client config json are not honored #218

Closed dazuma closed 5 years ago

dazuma commented 5 years ago

Client config JSON files generated by gapic-generator sometimes include a timeout_millis field that sets the preferred default timeout for each call. (This value is used in the non-retry case. See Google::Gax.add_timeout_arg.)

As far as I can tell, this value is not being honored. Instead, the default timeout set in the gapic-generated client class is used. (This value seems to be hard-coded at 30s.)

This may be causing problems for services like Tasks, which currently implements a server-side limit of 30s on the timeout, and thus results in intermittent failures of this precondition.

This should probably be fixed in settings.rb in Google::Gax.construct_settings by reading any timeout_millis from the overriding_method hash.