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

deps: declare google-auth-library-oauth2-http #879

Closed
wants to merge 2 commits into from

Conversation

suztomo
Copy link
Member

@suztomo suztomo commented Oct 18, 2021

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

@suztomo suztomo requested review from a team as code owners October 18, 2021 18:59
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/java-pubsub API. label Oct 18, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 18, 2021
@suztomo
Copy link
Member Author

suztomo commented Oct 18, 2021

@hannahrogers-google @Neenu1995 I think this will fix the potential missing com.google.auth.oauth2 package problem when a new shared dependencies BOM comes out.
googleapis/java-shared-dependencies#498 (comment)

@suztomo
Copy link
Member Author

suztomo commented Oct 18, 2021

The build is failing.

 Unused declared dependencies found:
887Warning:     com.google.auth:google-auth-library-oauth2-http:jar:1.1.0:compile

It's used here

import com.google.auth.oauth2.GoogleCredentials;

Why?

How to reproduce?

The following command fails:

mvn -B dependency:analyze -DfailOnWarning=true

@Neenu1995 Neenu1995 added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 18, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 18, 2021
The Maven analyzer plugin somehow marks the auth library unused
even though it's actually used.
googleapis#879
@@ -147,6 +150,7 @@
<ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependency>io.opencensus:opencensus-impl</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>javax.annotation:javax.annotation-api</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>com.google.auth:google-auth-library-oauth2-http</ignoredUnusedDeclaredDependency>
Copy link
Member Author

Choose a reason for hiding this comment

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

Somehow I have to mark this artifact in ignoredUnusedDeclaredDependency even though it's actually used.

Screen Shot 2021-10-18 at 4 54 11 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we won't need to add an exception when compilation becomes really broken after the new release of the shared dependencies BOM.

Comment on lines +44 to +47
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
</dependency>
Copy link
Member Author

@suztomo suztomo Oct 18, 2021

Choose a reason for hiding this comment

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

Why would this fail the "ci / dependencies"?

@hannahrogers-google hannahrogers-google added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 18, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 18, 2021
@suztomo suztomo added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 19, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 19, 2021
@suztomo
Copy link
Member Author

suztomo commented Oct 19, 2021

#882 has been merged.

@suztomo suztomo closed this Oct 19, 2021
@suztomo suztomo deleted the declare_auth branch October 19, 2021 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/java-pubsub API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants