spring-attic / spring-cloud-gcp

Integration for Google Cloud Platform APIs with Spring
Apache License 2.0
704 stars 694 forks source link

Install Linkage Checker enforcer rule for the spring-cloud-gcp-dependencies BOM #2488

Closed suztomo closed 4 years ago

suztomo commented 4 years ago

This is a followup of #1658

suztomo commented 4 years ago

Travis failed at install task.

[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ spring-cloud-gcp-pubsub-stream-binder-functional-sample-test ---
[INFO] Installing /home/travis/build/spring-cloud/spring-cloud-gcp/spring-cloud-gcp-samples/spring-cloud-gcp-pubsub-stream-binder-functional-sample/spring-cloud-gcp-pubsub-stream-binder-functional-sample-test/target/spring-cloud-gcp-pubsub-stream-binder-functional-sample-test-1.2.5.BUILD-SNAPSHOT.jar to /home/travis/.m2/repository/org/springframework/cloud/spring-cloud-gcp-pubsub-stream-binder-functional-sample-test/1.2.5.BUILD-SNAPSHOT/spring-cloud-gcp-pubsub-stream-binder-functional-sample-test-1.2.5.BUILD-SNAPSHOT.jar
[INFO] Installing /home/travis/build/spring-cloud/spring-cloud-gcp/spring-cloud-gcp-samples/spring-cloud-gcp-pubsub-bus-config-sample/spring-cloud-gcp-pubsub-bus-config-sample-server-local/pom.xml to /home/travis/.m2/repository/org/springframework/cloud/spring-cloud-gcp-pubsub-bus-config-sample-server-local/1.2.5.BUILD-SNAPSHOT/spring-cloud-gcp-pubsub-bus-config-sample-server-local-1.2.5.BUILD-SNAPSHOT.pom
[INFO] Installing /home/travis/build/spring-cloud/spring-cloud-gcp/spring-cloud-gcp-samples/spring-cloud-gcp-pubsub-stream-binder-functional-sample/spring-cloud-gcp-pubsub-stream-binder-functional-sample-test/pom.xml to /home/travis/.m2/repository/org/springframework/cloud/spring-cloud-gcp-pubsub-stream-binder-functional-sample-test/1.2.5.BUILD-SNAPSHOT/spring-cloud-gcp-pubsub-stream-binder-functional-sample-test-1.2.5.BUILD-SNAPSHOT.pom
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
elefeint commented 4 years ago

That looks like a Travis flake; we get them once every couple of weeks.

codecov[bot] commented 4 years ago

Codecov Report

Merging #2488 into master will decrease coverage by 7.22%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2488      +/-   ##
============================================
- Coverage     81.43%   74.21%   -7.23%     
+ Complexity     2382     2155     -227     
============================================
  Files           267      267              
  Lines          7736     7736              
  Branches        798      798              
============================================
- Hits           6300     5741     -559     
- Misses         1098     1626     +528     
- Partials        338      369      +31     
Flag Coverage Δ Complexity Δ
#integration ? ?
#unittests 74.21% <ø> (ø) 2155.00 <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...gcp/secretmanager/SecretManagerPropertySource.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-4.00%)
...a/spanner/repository/query/SpannerQueryMethod.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-6.00%)
...retmanager/SecretManagerPropertySourceLocator.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...figure/config/GcpConfigBootstrapConfiguration.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...e/spanner/GcpSpannerEmulatorAutoConfiguration.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...epository/config/SpannerRepositoriesRegistrar.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-3.00%)
...ository/config/DatastoreRepositoriesRegistrar.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-3.00%)
...restore/GcpFirestoreEmulatorAutoConfiguration.java 0.00% <0.00%> (-84.85%) 0.00% <0.00%> (-4.00%)
...ramework/cloud/gcp/vision/DocumentOcrTemplate.java 17.64% <0.00%> (-73.53%) 4.00% <0.00%> (-5.00%)
...work/cloud/gcp/bigquery/core/BigQueryTemplate.java 0.00% <0.00%> (-71.70%) 0.00% <0.00%> (-8.00%)
... and 53 more

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 141ba77...1e6d143. Read the comment docs.

suztomo commented 4 years ago

Codecov bot shows lots of red. I didn't change any Java code though. Is Linkage Checker enforcer rule interfering the code coverage retrieval?

Screen Shot 2020-08-13 at 11 07 43

@elefeint Thanks.

suztomo commented 4 years ago

Travis behaves strangely.

Execution enforce-linkage-checker of goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce failed:
The source class in the reference is no longer available in the class path: Exception while looking for class
org.springframework.cloud.gcp.autoconfigure.sql.GcpCloudSqlProperties: java.io.IOException: Couldn't find:
org/springframework/cloud/gcp/autoconfigure/sql/GcpCloudSqlProperties.class

This is a this-should-not-happen type error. Problem in class loading / filesystem?

suztomo commented 4 years ago

4GB also shows the problem. Let me dig further.

elefeint commented 4 years ago

Ignore codecov; its base is unit + integration tests, so all pull requests look like they drop coverage. We really need to have a unit-only base to make it a meaningful tool.

suztomo commented 4 years ago

@elefeint I see. Thank you for info.

Linkage checker gets stuck in Linux (even gLinux). In Mac, it works fine. Closing this for now. I'll investigate further.

suztomo commented 4 years ago

Commit 1e6d143 passed Travis. So the threading parameter "-T 1.5C" is related to the error.

[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-linkage-checker) @ spring-cloud-gcp-dependencies ---
[INFO] No reachable error found
suztomo commented 4 years ago

It turned out that Linkage Checker cannot handle multi-thread Maven execution, because a JAR file is updated by another install task while it's running.