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

Linkage Checker to examine linkage error at artifact level #1032

Merged
merged 10 commits into from May 26, 2020

Conversation

suztomo
Copy link
Member

@suztomo suztomo commented May 6, 2020

Linkage Checker to examine linkage error at artifact level

  • gax-grpc has linkage errors caused by gRPC dependencies. The errors are suppressed by gax-grpc/linkage-checker-exclusion.xml.

@googlebot googlebot added the cla: yes label May 6, 2020
@codecov
Copy link

@codecov codecov bot commented May 6, 2020

Codecov Report

Merging #1032 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1032   +/-   ##
=========================================
  Coverage     78.76%   78.76%           
  Complexity     1171     1171           
=========================================
  Files           204      204           
  Lines          5180     5180           
  Branches        416      416           
=========================================
  Hits           4080     4080           
  Misses          925      925           
  Partials        175      175           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8d5ad0...4162f29. Read the comment docs.

@suztomo
Copy link
Member Author

@suztomo suztomo commented May 6, 2020

As part of linkage-monitor.sh script, new linkage checker tasks worked for each artifact:

...
> Task :gax:checkJavaLinkage
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

> Task :gax-grpc:checkJavaLinkage
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

> Task :gax-httpjson:checkJavaLinkage
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 16s

log

@suztomo
Copy link
Member Author

@suztomo suztomo commented May 6, 2020

@elharo @chingor13 PTAL.

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Contributor

@elharo elharo May 6, 2020

Choose a reason for hiding this comment

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

couldn't we simply not have such a file here?

Copy link
Member Author

@suztomo suztomo May 6, 2020

Choose a reason for hiding this comment

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

That would work. However the build.gradle would have if-statement to check whether the project is gax-grpc or not, to set the argument.

Copy link
Member Author

@suztomo suztomo May 7, 2020

Choose a reason for hiding this comment

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

Removed these empty files in favor of the if-statement in build.gradle.

Copy link
Member Author

@suztomo suztomo left a comment

@elharo PTAL.

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Member Author

@suztomo suztomo May 7, 2020

Choose a reason for hiding this comment

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

Removed these empty files in favor of the if-statement in build.gradle.

elharo
elharo approved these changes May 7, 2020
if (project.name == 'gax-grpc') {
// The exclusion file can be regenerated by '-o' option. See its Wiki for details:
// https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/LinkageCheckerMain#exclusion-files
arguments += ['--exclusion-file', 'linkage-checker-exclusion.xml']
Copy link
Contributor

@elharo elharo May 7, 2020

Choose a reason for hiding this comment

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

This makes me wonder if we really need to set the name and have a command line argument at all. Does it make sense to have a standard filename and location where the linkage checker looks?

@elharo
Copy link
Contributor

@elharo elharo commented May 12, 2020

  • What went wrong:
    A problem occurred configuring root project 'gax-java'.

Could not resolve all artifacts for configuration ':classpath'.
Could not resolve net.ltgt.gradle:gradle-apt-plugin:0.10.
Required by:
project :
> Could not resolve net.ltgt.gradle:gradle-apt-plugin:0.10.
> Could not get resource 'https://plugins.gradle.org/m2/net/ltgt/gradle/gradle-apt-plugin/0.10/gradle-apt-plugin-0.10.pom'.
> Could not GET 'https://plugins.gradle.org/m2/net/ltgt/gradle/gradle-apt-plugin/0.10/gradle-apt-plugin-0.10.pom'.
> sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed

  • Try:
    Run with --stacktrace option to get th

@suztomo
Copy link
Member Author

@suztomo suztomo commented May 12, 2020

Java 7 from Kokoro

A problem occurred configuring root project 'gax-java'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve net.ltgt.gradle:gradle-apt-plugin:0.10.
     Required by:
         project :
      > Could not resolve net.ltgt.gradle:gradle-apt-plugin:0.10.
         > Could not get resource 'https://plugins.gradle.org/m2/net/ltgt/gradle/gradle-apt-plugin/0.10/gradle-apt-plugin-0.10.pom'.
            > Could not GET 'https://plugins.gradle.org/m2/net/ltgt/gradle/gradle-apt-plugin/0.10/gradle-apt-plugin-0.10.pom'.
               > sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: signature check failed

Somehow there was one successful Java 7 Kokoro build 73eadc5: https://source.cloud.google.com/results/invocations/bbaaac7f-a8dd-4310-8bb7-0ea02c74be11/targets/cloud-devrel%2Fclient-libraries%2Fjava%2Fgax-java%2Fpresubmit%2Fjava7/log

@suztomo
Copy link
Member Author

@suztomo suztomo commented May 21, 2020

@chingor13 @stephaniewang526 Would you update repository setting for "Required" check? I stopped Kokoro's checks for gax-java.

  • Remove Kokoro checks from "Required" checks
  • Mark the 4 GitHub Actions checks as "Required"

Screen Shot 2020-05-21 at 15 51 23

@chingor13
Copy link
Contributor

@chingor13 chingor13 commented May 26, 2020

Updated the settings manually and will manage this repo's settings via our settings bot: googleapis/repo-automation-bots#565

@chingor13 chingor13 merged commit 28ec963 into googleapis:master May 26, 2020
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants