feat: drop faraday and use Net::HTTP - #37
Conversation
e139df9 to
00807a3
Compare
There was a problem hiding this comment.
Pull request overview
Replaces the Faraday-based HTTP transport in qdrant-ruby with a custom Net::HTTP implementation, updating the client internals and test suite accordingly, and removing the Faraday runtime dependency.
Changes:
- Introduce
Qdrant::Client::Connection,RequestBuilder/Request, andResponseBuilder/Responseto perform and parseNet::HTTPrequests. - Update specs to stub
Qdrant::Client::Connectionand add a transport-levelconnection_specusing a local TCP server. - Remove
faradayfrom runtime deps and update Ruby/CI/tooling versions.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/spec_helper.rb | Removes Faraday/OpenStruct requirements now that Faraday is no longer used in specs. |
| spec/qdrant/snapshots_spec.rb | Switches stubbing from Faraday::Connection to Qdrant::Client::Connection and uses Qdrant::Client::Response. |
| spec/qdrant/service_spec.rb | Same: replaces Faraday/OpenStruct usage with new Response/Connection types. |
| spec/qdrant/points_spec.rb | Same: updates response doubles and connection stubs to match new transport. |
| spec/qdrant/connection_spec.rb | Adds end-to-end request/response behavior tests for the new Net::HTTP transport. |
| spec/qdrant/collections_spec.rb | Migrates collection specs off Faraday/OpenStruct to the new Response/Connection types. |
| spec/qdrant/clusters_spec.rb | Migrates cluster specs off Faraday/OpenStruct. |
| spec/qdrant/aliases_spec.rb | Migrates alias specs off Faraday/OpenStruct. |
| qdrant.gemspec | Removes Faraday dependency and raises required Ruby version. |
| lib/qdrant/points.rb | Minor formatting cleanup in method signature area. |
| lib/qdrant/client/response.rb | Adds Response struct + ResponseBuilder for parsing JSON vs returning raw bodies. |
| lib/qdrant/client/request.rb | Adds RequestBuilder/Request to build URIs, set headers/body, perform Net::HTTP call, and log. |
| lib/qdrant/client/connection.rb | Adds Connection wrapper exposing get/post/put/patch/delete and returning Qdrant::Client::Response. |
| lib/qdrant/client.rb | Removes Faraday wiring; constructs and memoizes the new Connection; adds URL normalization. |
| Gemfile.lock | Updates lockfile to remove Faraday and refresh dev tooling dependencies. |
| Gemfile | Updates standard version. |
| .github/workflows/ci.yml | Updates CI Ruby matrix and minor whitespace cleanup. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@shetty-tejas Lmk when it's ready, or if you're still making changes. |
|
@andreibondarev Could you help me determine the appropriate version bump for this? I'm not sure whether it should be a patch or minor release. The implementation is ready for review. I only need to resolve the remaining CI failure. |
Yep, once it's merged I'll cut and push a new version. |
|
@andreibondarev CI should be green now. I had to add |
|
@andreibondarev I also recommend running an end-to-end test against the Qdrant APIs before cutting a new release. I can do this by tomorrow if needed, or you can run it sooner if you already have a test bench available. |
I don't. If you're available to do that -- that'd be phenomenal. |
|
@andreibondarev sounds good, I'll run the end-to-end tests and report back here by tomorrow 😄 |
|
@andreibondarev I've added an E2E test script. Set It passes against a hosted Qdrant cluster: Please run it against your Qdrant cluster as well. The implementation is ready for review 😄 |
|
@shetty-tejas Pushed up 0.10.0. Thanks again! 🥇 |

Inspired from #16
Replace Faraday with
Net::HTTPPurpose
Removes the faraday runtime dependency from qdrant-ruby and replaces the HTTP transport with Ruby's stdlib Net::HTTP, preserving the existing client constructor, endpoint method signatures, request/response behavior, and the public client.connection call shape. The gem now ships with one runtime dependency (logger).
What changed
Client
Specs
Packaging / toolchain