Skip to content

feat(‎google-apis-core): allow setting the faraday adapter to use - #27337

Merged
quartzmo merged 1 commit into
googleapis:mainfrom
persona-id:faraday-adapter
Oct 22, 2026
Merged

quartzmo merged 1 commit into
googleapis:mainfrom
persona-id:faraday-adapter

Conversation

@HoneyryderChuck

@HoneyryderChuck HoneyryderChuck commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

The application I work on uses httpclient and relies on its persistent connection feature and request hedging to keep p99 google storage uploads to a minimum. v1 changed to faraday, which is understandable, but the default faraday adapter uses net-http, which does not do persistent requests, and would severely limit our ability to seamlessly upgrade.

This patch introduces a new client option, :adapter, which allows setting a default adapter (faraday has several) which supports persistent connections via:

Google::Apis::ClientOptions.default.adapter = :httpx # or
:net_http_persistent

Closes #27339 27339

@HoneyryderChuck
HoneyryderChuck requested a review from a team as a code owner July 13, 2026 16:49
@google-cla

google-cla Bot commented Jul 13, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@quartzmo

Copy link
Copy Markdown
Member

@HoneyryderChuck Thanks for opening this PR. Can you also open a corresponding new feature request issue? You can just copy and paste your description above, I think it's clear what you want.

@quartzmo quartzmo added the needs more info This issue needs more information from the customer to proceed. label Jul 16, 2026
@HoneyryderChuck

HoneyryderChuck commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor Author

@quartzmo Done (#27339 )

@HoneyryderChuck

Copy link
Copy Markdown
Contributor Author

@quartzmo any updates on this one?

@amanda-tarafa amanda-tarafa removed the needs more info This issue needs more information from the customer to proceed. label Oct 10, 2026

@quartzmo quartzmo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HoneyryderChuck I really apologize for the long wait on this. Thanks so much for this contribution. Just a couple changes and we'll get it in.

Comment thread google-apis-core/lib/google/apis/options.rb Outdated
Comment thread google-apis-core/lib/google/apis/core/base_service.rb
Comment thread google-apis-core/lib/google/apis/options.rb Outdated
@quartzmo quartzmo changed the title allow setting the faraday adapter to use feat(‎google-apis-core): allow setting the faraday adapter to use Oct 22, 2026
The application I work on uses httpclient and relies on its persistent
connection feature and request hedging to keep p99 google storage
uploads to a minimum. v1 changed to faraday, which is understandable,
but the default faraday adapter uses net-http, which does not do
persistent requests, and would severely limit our ability to seamlessly
upgrade.

This patch introduces a new client option, `:adapter`, which allows
setting a default adapter (faraday has several) which supports
persistent connections via:

```ruby
Google::Apis::ClientOptions.default.adapter = :httpx # or :net_http_persistent
```
@HoneyryderChuck

Copy link
Copy Markdown
Contributor Author

@quartzmo done

@quartzmo quartzmo added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 22, 2026
@quartzmo
quartzmo merged commit 370d8ae into googleapis:main Oct 22, 2026
15 of 16 checks passed
@HoneyryderChuck
HoneyryderChuck deleted the faraday-adapter branch October 22, 2026 16:46
quartzmo added a commit that referenced this pull request Oct 22, 2026
…28298)

* Remove the unused `use_net_http` spec setting. This references removed code and will error if invoked.

Refs #27337
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kokoro:force-run Add this label to force Kokoro to re-run the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow setting the faraday adapter to use

4 participants