HomePhabricator
Diffusion Comm e27efd9e9850

[services][commtest] Replace gRPC Blob client with HTTP

Description

[services][commtest] Replace gRPC Blob client with HTTP

Summary:
Resolves ENG-3869. Decided to finish this now to unblock gRPC removal and leave Commtest unbroken when using the new Blob service DB schema that will require the new HTTP interface.

A brief summary of the changes:

  • Added reqwest dependency - a HTTP client. Also added serde but we already use it in other services - added @ashoat as a reviewer
  • Replaced gRPC BlobServiceClient utilities with HTTP reqwest calls.
  • Removed some unnecessary &mut references

This diff is pretty big but I had difficulties splitting it into smaller ones. I added inline comments to explain the changes.

Test Plan:
Started Blob service in trace log level, with the following command:

RUST_LOG=blob=trace cargo run -- --sandbox --localstack-url "http://localstack:4566" --http-port 50053

Important thing is to set the port to 50053 because this is what the commtest expects - it reads the COMM_SERVICES_PORT_BLOB env var that is set in services/.env

Then started both integration and performance tests:

cd services
yarn run-integration-tests blob
yarn run-performance-tests blob

Observed blob service trace logs and confirmed it is doing steps that are expected for the tests.

Reviewers: ashoat, jon, michal, pklatka

Reviewed By: michal

Subscribers: tomek, ashoat

Differential Revision: https://phab.comm.dev/D8408

Details

Provenance
bartekAuthored on Jun 30 2023, 10:51 AM
Reviewer
michal
Differential Revision
D8408: [services][commtest] Replace gRPC Blob client with HTTP
Parents
rCOMM9ef42369669d: [blob-service] Require holder and blob_hash in 'remove' endpoint
Branches
Unknown
Tags
Unknown