Repository navigation
docs(core): document ClientOptions#adapter requirements and caveats - #28298
Merged
Merged
Conversation
Follows up googleapis#27337 by documenting what a non-default adapter must support (streaming downloads, timeouts and proxy, retriable errors, thread safety), plus the fork and timing caveats. Also fixes the OVERVIEW wording, adds a spec for the default adapter and removes the unused `use_net_http` spec setting. Refs googleapis#27337
torreypayne
approved these changes
Oct 22, 2026
| gem "google-apis-core", "~> 0.18" | ||
|
|
||
| The `faraday` integration ships with, and only tests against the default adapter, which wraps [net-http](https://github.com/ruby/net-http). You can change the adapter by setting the `:adapter` client option: | ||
| google-apis-core uses Faraday's default adapter, which wraps [net-http](https://github.com/ruby/net-http), and is tested only against it. You can change the adapter by setting the `:adapter` client option: |
Member
There was a problem hiding this comment.
So we were still communicating the adapter client_option but stopped offering it? ✅
Member
Author
| Google::Apis::RequestOptions.default.retries = 5 | ||
|
|
||
| # Allow testing different adapters | ||
| Google::Apis::ClientOptions.default.use_net_http = true if ENV['USE_NET_HTTP'] |
Member
Author
There was a problem hiding this comment.
It's dead code: ClientOptions#use_net_http was an httpclient-era switch (e8481dd, 2015) that stopped being read in 2046e00 (2016) and was removed from ClientOptions in 4682267 (2017). Setting it now raises NoMethodError, so USE_NET_HTTP=1 would break the spec run. I've removed the same line from the generator's spec helper too. Faraday's default adapter already is net-http.
Same dead line as in the core spec helper: ClientOptions#use_net_http was removed in 2017 (4682267), so setting it raises NoMethodError when USE_NET_HTTP is set.
torreypayne
approved these changes
Oct 22, 2026
This was referenced Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows up #27337 by documenting what a non-default adapter must support (streaming downloads, timeouts and proxy, retriable errors, thread safety), plus the fork and timing caveats. Also fixes the OVERVIEW wording, adds a spec for the default adapter and removes the unused
use_net_httpspec setting.Refs: #27337