Skip to content

Commit

Permalink
[5.2] Upgrade Google Auth Version (#15383)
Browse files Browse the repository at this point in the history
* [Step 1] Upgrade Google Auth Version

third party only changes

gson

add back jackson

Partial commit for third_party/*, see #15215.

Closes #15215

Signed-off-by: Yun Peng <pcloudy@google.com>

* [Step 2] Update non-third party change for jackson2

Follow up for #15215 and Step two for #15176

Closes #15295.

PiperOrigin-RevId: 443050332

* clean up

Partial commit for third_party/*, see #15301.

Closes: #15301

Signed-off-by: Yun Peng <pcloudy@google.com>

Co-authored-by: Thomas Chen <jchen@snapchat.com>
Co-authored-by: ThomasCJY <thomascjy93@gmail.com>
  • Loading branch information
3 people authored May 9, 2022
1 parent b30b3ed commit f0213bb
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import build.bazel.remote.execution.v2.Tree;
import build.bazel.remote.execution.v2.UpdateActionResultRequest;
import com.google.api.client.json.GenericJson;
import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.client.json.gson.GsonFactory;
import com.google.bytestream.ByteStreamGrpc.ByteStreamImplBase;
import com.google.bytestream.ByteStreamProto.QueryWriteStatusRequest;
import com.google.bytestream.ByteStreamProto.QueryWriteStatusResponse;
Expand Down Expand Up @@ -213,7 +213,7 @@ protected GrpcCacheClient newClient(
json.put("client_secret", "foo");
json.put("refresh_token", "bar");
Scratch scratch = new Scratch();
scratch.file(authTlsOptions.googleCredentials, new JacksonFactory().toString(json));
scratch.file(authTlsOptions.googleCredentials, new GsonFactory().toString(json));

CallCredentialsProvider callCredentialsProvider;
try (InputStream in = scratch.resolve(authTlsOptions.googleCredentials).getInputStream()) {
Expand Down
18 changes: 5 additions & 13 deletions third_party/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ distrib_java_import(
enable_distributions = ["debian"],
jars = [
"api_client/google-api-client-1.22.0.jar",
"api_client/google-api-client-jackson2-1.22.0.jar",
"api_client/google-api-client-gson-1.22.0.jar",
"api_client/google-http-client-1.22.0-SNAPSHOT.jar",
"api_client/google-http-client-jackson2-1.22.0.jar",
"api_client/google-http-client-gson-1.22.0.jar",
],
runtime_deps = [
":jackson2",
":gson",
],
)

Expand Down Expand Up @@ -217,8 +217,8 @@ distrib_java_import(
name = "auth",
enable_distributions = ["debian"],
jars = [
"auth/google-auth-library-oauth2-http-0.17.1.jar",
"auth/google-auth-library-credentials-0.17.1.jar",
"auth/google-auth-library-oauth2-http-1.6.0.jar",
"auth/google-auth-library-credentials-1.6.0.jar",
],
runtime_deps = [
":api_client",
Expand Down Expand Up @@ -410,14 +410,6 @@ java_import(
],
)

distrib_java_import(
name = "jackson2",
enable_distributions = ["debian"],
jars = [
"jackson2/jackson-core-2.8.6.jar",
],
)

distrib_java_import(
name = "jcip_annotations",
enable_distributions = ["debian"],
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed third_party/jackson2/jackson-core-2.8.6.jar
Binary file not shown.

0 comments on commit f0213bb

Please sign in to comment.