From 1abd5ab375940f5be2cf8ce68be4c00251241a47 Mon Sep 17 00:00:00 2001 From: Gonzalo <456459+grzuy@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:20:39 -0300 Subject: [PATCH 1/5] test: fixes test for tesla >= 1.5 --- clients/gax/test/gax/api_test.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/gax/test/gax/api_test.exs b/clients/gax/test/gax/api_test.exs index fbcc574e14..d4e11b2159 100644 --- a/clients/gax/test/gax/api_test.exs +++ b/clients/gax/test/gax/api_test.exs @@ -35,7 +35,7 @@ defmodule Gax.ApiTest do mock(fn %{ method: :get, url: "https://example.com/v1/stores/store-1/pets", - headers: [{"x-goog-api-client", ^api_client}] + headers: [{"x-goog-api-client", ^api_client}, {"accept-encoding", "gzip, deflate"}] } -> %Tesla.Env{status: 200, body: @pets_json} end) @@ -61,7 +61,7 @@ defmodule Gax.ApiTest do mock(fn %{ method: :get, url: "https://example.com/v1/stores/store-1/pets", - headers: [{"x-goog-api-client", ^api_client}] + headers: [{"x-goog-api-client", ^api_client}, {"accept-encoding", "gzip, deflate"}] } -> %Tesla.Env{status: 200, body: @pets_json_compressed, headers: [{"content-encoding", "gzip"}]} From 3e63a5f028ccc83a90ecffb99a07af244ca7d73f Mon Sep 17 00:00:00 2001 From: Gonzalo <456459+grzuy@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:26:46 -0300 Subject: [PATCH 2/5] test: fixes test for tesla >= 1.8 --- clients/gax/test/gax/api_test.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/gax/test/gax/api_test.exs b/clients/gax/test/gax/api_test.exs index d4e11b2159..34a77bfd35 100644 --- a/clients/gax/test/gax/api_test.exs +++ b/clients/gax/test/gax/api_test.exs @@ -35,7 +35,7 @@ defmodule Gax.ApiTest do mock(fn %{ method: :get, url: "https://example.com/v1/stores/store-1/pets", - headers: [{"x-goog-api-client", ^api_client}, {"accept-encoding", "gzip, deflate"}] + headers: [{"x-goog-api-client", ^api_client}, {"accept-encoding", "gzip, deflate, identity"}] } -> %Tesla.Env{status: 200, body: @pets_json} end) @@ -61,7 +61,7 @@ defmodule Gax.ApiTest do mock(fn %{ method: :get, url: "https://example.com/v1/stores/store-1/pets", - headers: [{"x-goog-api-client", ^api_client}, {"accept-encoding", "gzip, deflate"}] + headers: [{"x-goog-api-client", ^api_client}, {"accept-encoding", "gzip, deflate, identity"}] } -> %Tesla.Env{status: 200, body: @pets_json_compressed, headers: [{"content-encoding", "gzip"}]} From cee418b72e95bbb6f14a20640df2ec3784c1f474 Mon Sep 17 00:00:00 2001 From: Gonzalo <456459+grzuy@users.noreply.github.com> Date: Fri, 19 Jun 2026 10:47:14 -0300 Subject: [PATCH 3/5] fix: fixes Tesla.Middleware.DecompressResponse opttions for tesla 1.18.3+ --- clients/gax/lib/google_api/gax/connection.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/gax/lib/google_api/gax/connection.ex b/clients/gax/lib/google_api/gax/connection.ex index 1b7e95edfe..a254aa5f67 100644 --- a/clients/gax/lib/google_api/gax/connection.ex +++ b/clients/gax/lib/google_api/gax/connection.ex @@ -33,7 +33,7 @@ defmodule GoogleApi.Gax.Connection do ) ) - plug(Tesla.Middleware.DecompressResponse, []) + plug(Tesla.Middleware.DecompressResponse, max_body_size: :infinity) plug(Tesla.Middleware.EncodeJson, engine: Poison) From 9145e12bd84971edc139188fed3bdf7fdfa1385a Mon Sep 17 00:00:00 2001 From: Gonzalo <456459+grzuy@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:30:31 -0300 Subject: [PATCH 4/5] fix: fixes multipart body fields for tesla >= 1.18.3 --- clients/gax/lib/google_api/gax/connection.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/gax/lib/google_api/gax/connection.ex b/clients/gax/lib/google_api/gax/connection.ex index a254aa5f67..5473916785 100644 --- a/clients/gax/lib/google_api/gax/connection.ex +++ b/clients/gax/lib/google_api/gax/connection.ex @@ -182,7 +182,7 @@ defmodule GoogleApi.Gax.Connection do nil -> body _ -> Tesla.Multipart.add_field( body, - :metadata, + "metadata", Poison.encode!(meta), headers: [{:"Content-Type", "application/json"}] ) @@ -193,7 +193,7 @@ defmodule GoogleApi.Gax.Connection do {res, type} = try_encode_multipart_field(data, meta) Tesla.Multipart.add_field( b, - body_name, + to_string(body_name), res, headers: [{:"Content-Type", type}] ) From c8d4de139eaff282a5d69c794187567e128d4650 Mon Sep 17 00:00:00 2001 From: Gonzalo <456459+grzuy@users.noreply.github.com> Date: Fri, 19 Jun 2026 13:02:49 -0300 Subject: [PATCH 5/5] fix(deps): removes unnecessary required dependency on mime --- clients/gax/mix.exs | 1 - 1 file changed, 1 deletion(-) diff --git a/clients/gax/mix.exs b/clients/gax/mix.exs index b654b6cc49..000e7e1294 100644 --- a/clients/gax/mix.exs +++ b/clients/gax/mix.exs @@ -27,7 +27,6 @@ defmodule GoogleApi.Gax.MixProject do defp deps() do [ {:tesla, "~> 1.2"}, - {:mime, "~> 1.0"}, {:poison, ">= 3.0.0 and < 5.0.0"}, {:ex_doc, "~> 0.16", only: :dev}, {:dialyxir, "~> 0.5", only: [:dev], runtime: false}