Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Google Auth Version #15176

Closed

Conversation

ThomasCJY
Copy link
Contributor

upgrade google auth to use the latest v1.6.0 instead of the outdated 0.17 in bazel

@caseyduquettesc
Copy link

For some more context, in 1.5.3 built-in retries were added, which improves the reliability of fetching credentials from the metadata server - googleapis/google-auth-library-java@f9a9b8a

@sgowroji sgowroji added the team-Remote-Exec Issues and PRs for the Execution (Remote) team label Apr 6, 2022
@bazaglia
Copy link

bazaglia commented Apr 6, 2022

I believe this is also gonna fix #14278

I hope this gets merged soon, the current library is outdated by 3 years and currently prevents me using remote cache with Workload Identity Federation.

@@ -163,8 +163,10 @@ distrib_java_import(
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",
Copy link
Member

Choose a reason for hiding this comment

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

Does that mean the newer version uses gson instead of jackson2? It would be nice if we can remove jackson2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes looks like they switched to gson in 0.23.0 https://github.com/googleapis/google-auth-library-java/pull/531/files. Removed jackson dependency in pr

"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",
Copy link
Member

Choose a reason for hiding this comment

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

We probably need add :gson to runtime_deps on here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@ThomasCJY ThomasCJY requested a review from a team as a code owner April 6, 2022 19:20
@ThomasCJY ThomasCJY requested review from coeuvre and removed request for a team April 6, 2022 19:21
Copy link
Member

@coeuvre coeuvre left a comment

Choose a reason for hiding this comment

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

Thanks!

I didn't realize removing jackson2 will introduce non third_party changes. Unfortunately, we can't import PR that include both third_party and non third_party changes. In this case, we have to split the PR into 3 small PRs:

  1. Add Gson and upgrade Auth (third_party only changes)
  2. Replace jackson2 usages in non third_party packages
  3. Remove jackson2

Sorry the import process is not easy enough.

@ThomasCJY
Copy link
Contributor Author

@coeuvre #15215 part 1 PR is here

bazel-io pushed a commit that referenced this pull request Apr 20, 2022
Follow up for #15215 and Step two for #15176

Closes #15295.

PiperOrigin-RevId: 443050332
@ThomasCJY ThomasCJY mentioned this pull request Apr 20, 2022
@sgowroji sgowroji added the awaiting-review PR is awaiting review from an assigned reviewer label Apr 21, 2022
@coeuvre
Copy link
Member

coeuvre commented Apr 22, 2022

This PR has been submitted as 3 sub PRs. Closing.

@brentleyjones
Copy link
Contributor

@bazel-io flag

@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Apr 29, 2022
@brentleyjones
Copy link
Contributor

@coeuvre I had merge conflicts trying to cherry-pick the 3 sub-PRs. Could you take that on?

coeuvre pushed a commit to coeuvre/bazel that referenced this pull request May 2, 2022
Follow up for bazelbuild#15215 and Step two for bazelbuild#15176

Closes bazelbuild#15295.

PiperOrigin-RevId: 443050332
@ckolli5
Copy link

ckolli5 commented May 4, 2022

@bazel-io fork 5.2.0

@bazel-io bazel-io removed the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label May 4, 2022
ckolli5 pushed a commit that referenced this pull request May 9, 2022
* [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 <[email protected]>

* [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 <[email protected]>

Co-authored-by: Thomas Chen <[email protected]>
Co-authored-by: ThomasCJY <[email protected]>
tjgq added a commit to tjgq/bazel that referenced this pull request Aug 10, 2022
In bazelbuild#15176 we upgraded google-auth-library-oauth2-http to 1.6.0, but didn't
upgrade its dependencies accordingly; Maven claims 1.41.1 is needed [1].
In turn, a new transitive dependency on opencensus-contrib-http-util 0.31.0
also becomes necessary [2].

[1] https://mvnrepository.com/artifact/com.google.auth/google-auth-library-oauth2-http/1.6.0
[2] https://mvnrepository.com/artifact/com.google.http-client/google-http-client/1.41.1
tjgq added a commit to tjgq/bazel that referenced this pull request Aug 10, 2022
In bazelbuild#15176 we upgraded google-auth-library-oauth2-http to 1.6.0, but didn't
upgrade its dependencies accordingly; Maven claims 1.41.1 is needed [1].
In turn, a new transitive dependency on opencensus-contrib-http-util 0.31.0
also becomes necessary [2].

[1] https://mvnrepository.com/artifact/com.google.auth/google-auth-library-oauth2-http/1.6.0
[2] https://mvnrepository.com/artifact/com.google.http-client/google-http-client/1.41.1
tjgq added a commit to tjgq/bazel that referenced this pull request Aug 26, 2022
In bazelbuild#15176 we upgraded google-auth-library-oauth2-http to 1.6.0, but didn't
upgrade its dependencies accordingly; Maven claims 1.41.1 is needed [1].
In turn, a new transitive dependency on opencensus-contrib-http-util 0.31.0
also becomes necessary [2].

[1] https://mvnrepository.com/artifact/com.google.auth/google-auth-library-oauth2-http/1.6.0
[2] https://mvnrepository.com/artifact/com.google.http-client/google-http-client/1.41.1
tjgq added a commit to tjgq/bazel that referenced this pull request Aug 26, 2022
In bazelbuild#15176 we upgraded google-auth-library-oauth2-http to 1.6.0, but didn't
upgrade its dependencies accordingly; Maven claims 1.41.4 is needed [1].
In turn, a new transitive dependency on opencensus-contrib-http-util 0.31.0
also becomes necessary [2].

[1] https://mvnrepository.com/artifact/com.google.auth/google-auth-library-oauth2-http/1.6.0
[2] https://mvnrepository.com/artifact/com.google.http-client/google-http-client/1.41.4
tjgq added a commit to tjgq/bazel that referenced this pull request Aug 26, 2022
In bazelbuild#15176 we upgraded google-auth-library-oauth2-http to 1.6.0, but didn't
upgrade its dependencies accordingly; Maven claims 1.41.4 is needed [1].
In turn, a new transitive dependency on opencensus-contrib-http-util 0.31.0
also becomes necessary [2].

Fixes bazelbuild#15639.

[1] https://mvnrepository.com/artifact/com.google.auth/google-auth-library-oauth2-http/1.6.0
[2] https://mvnrepository.com/artifact/com.google.http-client/google-http-client/1.41.4
copybara-service bot pushed a commit that referenced this pull request Aug 27, 2022
In #15176 we upgraded google-auth-library-oauth2-http to 1.6.0, but didn't
upgrade its dependencies accordingly; Maven claims 1.41.4 is needed [1].
In turn, a new transitive dependency on opencensus-contrib-http-util 0.31.0
also becomes necessary [2].

Fixes #15639.

[1] https://mvnrepository.com/artifact/com.google.auth/google-auth-library-oauth2-http/1.6.0
[2] https://mvnrepository.com/artifact/com.google.http-client/google-http-client/1.41.4

Partial commit for third_party/*, see #16082.

Signed-off-by: Sunil Gowroji <[email protected]>
@ShreeM01 ShreeM01 removed the awaiting-review PR is awaiting review from an assigned reviewer label Sep 15, 2022
aiuto pushed a commit to aiuto/bazel that referenced this pull request Oct 12, 2022
In bazelbuild#15176 we upgraded google-auth-library-oauth2-http to 1.6.0, but didn't
upgrade its dependencies accordingly; Maven claims 1.41.4 is needed [1].
In turn, a new transitive dependency on opencensus-contrib-http-util 0.31.0
also becomes necessary [2].

Fixes bazelbuild#15639.

[1] https://mvnrepository.com/artifact/com.google.auth/google-auth-library-oauth2-http/1.6.0
[2] https://mvnrepository.com/artifact/com.google.http-client/google-http-client/1.41.4

Partial commit for third_party/*, see bazelbuild#16082.

Signed-off-by: Sunil Gowroji <[email protected]>
tjgq added a commit to tjgq/bazel that referenced this pull request Nov 11, 2022
In bazelbuild#15176 we upgraded google-auth-library-oauth2-http to 1.6.0, but didn't
upgrade its dependencies accordingly; Maven claims 1.41.4 is needed [1].
In turn, a new transitive dependency on opencensus-contrib-http-util 0.31.0
also becomes necessary [2].

Fixes bazelbuild#15639.

[1] https://mvnrepository.com/artifact/com.google.auth/google-auth-library-oauth2-http/1.6.0
[2] https://mvnrepository.com/artifact/com.google.http-client/google-http-client/1.41.4

Partial commit for third_party/*, see bazelbuild#16082.

Signed-off-by: Sunil Gowroji <[email protected]>
ShreeM01 pushed a commit that referenced this pull request Nov 15, 2022
In #15176 we upgraded google-auth-library-oauth2-http to 1.6.0, but didn't
upgrade its dependencies accordingly; Maven claims 1.41.4 is needed [1].
In turn, a new transitive dependency on opencensus-contrib-http-util 0.31.0
also becomes necessary [2].

Fixes #15639.

[1] https://mvnrepository.com/artifact/com.google.auth/google-auth-library-oauth2-http/1.6.0
[2] https://mvnrepository.com/artifact/com.google.http-client/google-http-client/1.41.4

Partial commit for third_party/*, see #16082.

Signed-off-by: Sunil Gowroji <[email protected]>

Signed-off-by: Sunil Gowroji <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Remote-Exec Issues and PRs for the Execution (Remote) team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants