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

Idea: checking the behavioral compatibility in the libraries in the LTS BOM #1974

Open
suztomo opened this issue Mar 9, 2021 · 12 comments
Open
Assignees
Labels
enhancement New feature or request p3

Comments

@suztomo
Copy link
Contributor

suztomo commented Mar 9, 2021

Problem

We'd like to see the libraries in LTS BOM are compatible with each other. This is not just for Java class file signature but also for behavioral change.

Idea: run the tests with LTS BOM

To capture behavioral change, we can leverage the tests in the repository of the each library in LTS BOM.

For example, if I want to check the compatibility of protobuf-java in LTS BOM and grpc-protobuf, then I can modify build.gradle to include api enforcedPlatform('com.google.cloud:gcp-lts-bom:0.1.0-SNAPSHOT') to see the compatibility.

I checkout grpc-java Git repository and insert the enforcedPlatform to one of build.gradle:

suztomo@suztomo:~/grpc-java$ git diff
diff --git a/protobuf/build.gradle b/protobuf/build.gradle
index af7f51c83..1c00e0a63 100644
--- a/protobuf/build.gradle
+++ b/protobuf/build.gradle
@@ -10,6 +10,8 @@ plugins {
 description = 'gRPC: Protobuf'
 
 dependencies {
+    api enforcedPlatform('com.google.cloud:gcp-lts-bom:0.1.0-SNAPSHOT')
+
     api project(':grpc-api'),
             libraries.jsr305,
             libraries.protobuf

If the tests pass, then the LTS BOM is compatible with the grpc-protobuf.

suztomo@suztomo:~/grpc-java$ ./gradlew :grpc-protobuf:check
*** Skipping the build of codegen and compilation of proto files because skipCodegen=true
  * Skipping the build of Android projects because skipAndroid=true

BUILD SUCCESSFUL in 3s
19 actionable tasks: 1 executed, 18 up-to-date

Implementation Design

Repositories

Checkout the following repositories with a release tag.

  • Beam
    • org.apache.beam:beam-sdks-java-core
    • org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core
    • org.apache.beam:beam-runners-google-cloud-dataflow-java
    • org.apache.beam:beam-sdks-java-io-google-cloud-platform
  • grpc-java
  • java-spanner
    • google-cloud-spanner

Checking out a specific revision

For example, to checkout java-spannner repository with a specific release tag, run the following command:

git clone -b v4.0.1 --depth=1 https://github.com/googleapis/java-spanner

For Gradle project

For the target modules, insert the BOM after keyword "dependencies":

dependencies {

so that it would look like:

 dependencies {
+    api enforcedPlatform('com.google.cloud:gcp-lts-bom:0.1.0-SNAPSHOT')
+

For Maven project

@suztomo suztomo changed the title Idea: checking LTS bomand Idea: checking the behavioral compatibility in the libraries in the LTS BOM Mar 9, 2021
@suztomo
Copy link
Contributor Author

suztomo commented Mar 9, 2021

Start with a shell script to

  • checkout repository with a tag
  • make necessary changes
  • run tests

For unit tests. Think about Integration tests later.

For pom.xml, fill version element from the value in the LTS BOM.

@suztomo suztomo self-assigned this Mar 9, 2021
@suztomo suztomo mentioned this issue Mar 11, 2021
@suztomo
Copy link
Contributor Author

suztomo commented Mar 11, 2021

I picked java-spanner's v4.0.1 tag as the starter and I ran the same command as .github/workflow/ci.yaml (without modifying any code) and the build fails on my cloudtop. Why?

$ JOB_TYPE=test .kokoro/build.sh
...
[ERROR] Failures: 
[ERROR]   GapicSpannerRpcTest.testCloseAllThreadsWhenClosingSpanner:217 
Expected: is <0>
     but: was <16>
[ERROR]   GapicSpannerRpcTest.testMultipleOpenSpanners:277 
Expected: is <0>
     but: was <16>

It works with v5.0.0 tag.

@suztomo
Copy link
Contributor Author

suztomo commented Mar 15, 2021

While writing code for it (https://github.com/GoogleCloudPlatform/cloud-opensource-java/tree/lts_tests), I found that java-spanner project (google-cloud-spanner) does not compile with Guava 30.1-jre (It builds with 30.1-android). In both my MacBook and Cloudtop (Linux).

https://gist.github.com/suztomo/bfb4765ad9e32a59f0d8d786f1092232

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project 
google-cloud-spanner: Compilation failure: Compilation failure: 
[ERROR] /Users/suztomo/java-spanner/google-cloud-spanner/src/main/java/com/google/cloud/spanner/IsRetryableInternalError.java:[24,8] 
com.google.cloud.spanner.IsRetryableInternalError is not abstract and does not override abstract method 
test(java.lang.Throwable) in java.util.function.Predicate
[ERROR] /Users/suztomo/java-spanner/google-cloud-spanner/src/main/java/com/google/cloud/spanner/IsSslHandshakeException.java:[22,8] 
com.google.cloud.spanner.IsSslHandshakeException is not abstract and does not override abstract method 
test(java.lang.Throwable) in java.util.function.Predicate

These classes are simple interface from Guava.

...
import com.google.common.base.Predicate;
import javax.net.ssl.SSLHandshakeException;

public class IsSslHandshakeException implements Predicate<Throwable> {
...

Why doesn't the Java compiler choose to use Guava's com.google.common.base.Predicate?

Example PR that shows the strange compilation failure: googleapis/java-spanner#959

@suztomo
Copy link
Contributor Author

suztomo commented Mar 16, 2021

I think the compiler plugin's source/target 1.7 is causing the compilation failure:

in the google-cloud-shared-config:

          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <configuration>
            <source>1.7</source>
            <target>1.7</target>
            <encoding>UTF-8</encoding>
            <compilerArgument>-Xlint:unchecked</compilerArgument>
            <compilerArgument>-Xlint:deprecation</compilerArgument>
            <showDeprecation>true</showDeprecation>
          </configuration>

If that's the case, then we cannot build the Yoshi repositories with Guava JRE flavor.

@suztomo
Copy link
Contributor Author

suztomo commented Mar 19, 2021

The Maven surefire plugin has configuration to set runtime class path (document).

For each library, I need to supply 2 things in surefire configuration (<project> / <build> / <plugins> / <plugin>):

  • Maven coordinates to remove
  • JAR file location to supply

For example, when I want to run the java-spanner test with very old Guava version, I supply the configuration:

--- a/google-cloud-spanner/pom.xml
+++ b/google-cloud-spanner/pom.xml
@@ -45,6 +45,12 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <reportNameSuffix>sponge_log</reportNameSuffix>
+          <classpathDependencyExcludes>
+            <classpathDependencyExclude>com.google.guava:guava</classpathDependencyExclude>
+          </classpathDependencyExcludes>
+          <additionalClasspathElements>
+            <additionalClasspathElement>/Users/suztomo/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar</additionalClasspathElement>
+          </additionalClasspathElements>
         </configuration>
         <executions>
           <execution>

It worked as expected:

$  mvn -B -V -ntp test \
          -Dclirr.skip=true \
          -Denforcer.skip=true \
          -Dmaven.javadoc.skip=true \
          -Dgcloud.download.skip=true \
          -T 1C
...
[INFO] Running com.google.cloud.spanner.KeyTest
[ERROR] Tests run: 7, Failures: 0, Errors: 6, Skipped: 0, Time elapsed: 0.176 s <<< FAILURE! - in com.google.cloud.spanner.KeyTest
[ERROR] com.google.cloud.spanner.KeyTest.toProto  Time elapsed: 0.008 s  <<< ERROR!
java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;JI)V
	at com.google.cloud.spanner.KeyTest.toProto(KeyTest.java:224)

@suztomo
Copy link
Contributor Author

suztomo commented Mar 23, 2021

google-http-java-client/google-http-client-appengine failed:

-------------------------------------------------------------------------------
Test set: com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactoryTest
-------------------------------------------------------------------------------
Tests run: 8, Failures: 0, Errors: 7, Skipped: 0, Time elapsed: 0.572 s <<< FAILURE! - in com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactoryTest
com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactoryTest.testSet  Time elapsed: 0.436 s  <<< ERROR!
com.google.apphosting.api.ApiProxy$UnknownException: An error occurred for the API request datastore_v3.Put().
Caused by: java.lang.VerifyError: class com.google.appengine.repackaged.com.google.common.collect.HashMultiset overrides final method add.(Ljava/lang/Object;I)I

com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactoryTest.testClear  Time elapsed: 0.007 s  <<< ERROR!
com.google.apphosting.api.ApiProxy$UnknownException: An error occurred for the API request datastore_v3.Put().
Caused by: java.lang.VerifyError: com/google/appengine/repackaged/com/google/common/collect/HashMultiset

com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactoryTest.testLarge  Time elapsed: 0.007 s  <<< ERROR!
com.google.apphosting.api.ApiProxy$UnknownException: An error occurred for the API request datastore_v3.Put().
Caused by: java.lang.VerifyError: com/google/appengine/repackaged/com/google/common/collect/HashMultiset

com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactoryTest.testContainsKeyAndValue  Time elapsed: 0.011 s  <<< ERROR!
com.google.apphosting.api.ApiProxy$UnknownException: An error occurred for the API request datastore_v3.Put().
Caused by: java.lang.VerifyError: com/google/appengine/repackaged/com/google/common/collect/HashMultiset

com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactoryTest.testDelete  Time elapsed: 0.009 s  <<< ERROR!
com.google.apphosting.api.ApiProxy$UnknownException: An error occurred for the API request datastore_v3.Put().
Caused by: java.lang.VerifyError: com/google/appengine/repackaged/com/google/common/collect/HashMultiset

com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactoryTest.testKeySet  Time elapsed: 0.007 s  <<< ERROR!
com.google.apphosting.api.ApiProxy$UnknownException: An error occurred for the API request datastore_v3.Put().
Caused by: java.lang.VerifyError: com/google/appengine/repackaged/com/google/common/collect/HashMultiset

com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactoryTest.testValues  Time elapsed: 0.007 s  <<< ERROR!
com.google.apphosting.api.ApiProxy$UnknownException: An error occurred for the API request datastore_v3.Put().
Caused by: java.lang.VerifyError: com/google/appengine/repackaged/com/google/common/collect/HashMultiset

Does this mean the google-http-client-appengine v1.39.1 does not work with appengine-api-1.0-sdk 1.9.86?

The google-http-client-appengine master uses 1.9.71.

But the master branch of google-http-client-appengine with 1.9.86 just works fine. Maybe there's problem in supplying newer version in the test class path?

This causes problem;

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <additionalClasspathElements>
            <additionalClasspathElement>
              /Users/suztomo/.m2/repository/com/google/appengine/appengine-api-1.0-sdk/1.9.86/appengine-api-1.0-sdk-1.9.86.jar
            </additionalClasspathElement>
          </additionalClasspathElements>
          <classpathDependencyExcludes>
            <classpathDependencyExclude>com.google.appengine:appengine-api-1.0-sdk
            </classpathDependencyExclude>
          </classpathDependencyExcludes>
        </configuration>
      </plugin>
[ERROR] com.google.api.client.extensions.appengine.datastore.AppEngineDataStoreFactoryTest.testSet  Time elapsed: 0.459 s  <<< ERROR!
com.google.apphosting.api.ApiProxy$UnknownException: An error occurred for the API request datastore_v3.Put().
	at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:672)
	at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:623)
	at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:595)
	at java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:533)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:530)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.VerifyError: class com.google.appengine.repackaged.com.google.common.collect.HashMultiset overrides final method add.(Ljava/lang/Object;I)I
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at com.google.appengine.api.datastore.dev.LocalDatastoreCostAnalysis.changedIndexRows(LocalDatastoreCostAnalysis.java:115)
	at com.google.appengine.api.datastore.dev.LocalDatastoreCostAnalysis.getWriteOps(LocalDatastoreCostAnalysis.java:77)
	at com.google.appengine.api.datastore.dev.LocalDatastoreService$WriteJob.calculateJobCost(LocalDatastoreService.java:2459)
	at com.google.appengine.api.datastore.dev.LocalDatastoreService.putImpl(LocalDatastoreService.java:926)
	at com.google.appengine.api.datastore.dev.LocalDatastoreService.put(LocalDatastoreService.java:797)
	at com.google.appengine.api.datastore.dev.LocalDatastoreV3Service.put(LocalDatastoreV3Service.java:58)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.invokeApiMethodJava(ApiProxyLocalImpl.java:711)
	at com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:666)
	... 9 more

I don't see com.google.appengine.repackaged.com.google.common.collect.HashMultiset defines the add method as final in the newer version 1.9.86:

suztomo-macbookpro44% javap -cp /Users/suztomo/.m2/repository/com/google/appengine/appengine-api-1.0-sdk/1.9.86/appengine-api-1.0-sdk-1.9.86.jar com.google.appengine.repackaged.com.google.common.collect.HashMultiset 
Compiled from "HashMultiset.java"
public final class com.google.appengine.repackaged.com.google.common.collect.HashMultiset<E> extends com.google.appengine.repackaged.com.google.common.collect.AbstractMapBasedMultiset<E> {
  public static <E> com.google.appengine.repackaged.com.google.common.collect.HashMultiset<E> create();
  public static <E> com.google.appengine.repackaged.com.google.common.collect.HashMultiset<E> create(int);
  public static <E> com.google.appengine.repackaged.com.google.common.collect.HashMultiset<E> create(java.lang.Iterable<? extends E>);
  public int setCount(java.lang.Object, int);
  public int remove(java.lang.Object, int);
  public int add(java.lang.Object, int);
  public int count(java.lang.Object);
  public java.util.Iterator iterator();
  public int size();
  public void clear();
  public void forEachEntry(java.util.function.ObjIntConsumer);
  public java.util.Set entrySet();
  public java.util.Set elementSet();
  public boolean setCount(java.lang.Object, int, int);
  public boolean contains(java.lang.Object);
  public boolean isEmpty();
}
suztomo-macbookpro44% 
suztomo-macbookpro44% javap -cp /Users/suztomo/.m2/repository/com/google/appengine/appengine-api-1.0-sdk/1.9.86/appengine-api-1.0-sdk-1.9.86.jar com.google.appengine.repackaged.com.google.common.collect.AbstractMapBasedMultiset
Compiled from "AbstractMapBasedMultiset.java"
abstract class com.google.appengine.repackaged.com.google.common.collect.AbstractMapBasedMultiset<E> extends com.google.appengine.repackaged.com.google.common.collect.AbstractMultiset<E> implements java.io.Serializable {
  protected com.google.appengine.repackaged.com.google.common.collect.AbstractMapBasedMultiset(java.util.Map<E, com.google.appengine.repackaged.com.google.common.collect.Count>);
  void setBackingMap(java.util.Map<E, com.google.appengine.repackaged.com.google.common.collect.Count>);
  public java.util.Set<com.google.appengine.repackaged.com.google.common.collect.Multiset$Entry<E>> entrySet();
  java.util.Iterator<E> elementIterator();
  java.util.Iterator<com.google.appengine.repackaged.com.google.common.collect.Multiset$Entry<E>> entryIterator();
  public void forEachEntry(java.util.function.ObjIntConsumer<? super E>);
  public void clear();
  int distinctElements();
  public int size();
  public java.util.Iterator<E> iterator();
  public int count(java.lang.Object);
  public int add(E, int);
  public int remove(java.lang.Object, int);
  public int setCount(E, int);
  static long access$022(com.google.appengine.repackaged.com.google.common.collect.AbstractMapBasedMultiset, long);
  static java.util.Map access$100(com.google.appengine.repackaged.com.google.common.collect.AbstractMapBasedMultiset);
  static long access$010(com.google.appengine.repackaged.com.google.common.collect.AbstractMapBasedMultiset);
}

The old version 1.9.71 defines it as final.

suztomo-macbookpro44% javap -cp /Users/suztomo/.m2/repository/com/google/appengine/appengine-api-1.0-sdk/1.9.71/appengine-api-1.0-sdk-1.9.71.jar com.google.appengine.repackaged.com.google.common.collect.AbstractMapBasedMultiset
Compiled from "AbstractMapBasedMultiset.java"
abstract class com.google.appengine.repackaged.com.google.common.collect.AbstractMapBasedMultiset<E> extends com.google.appengine.repackaged.com.google.common.collect.AbstractMultiset<E> implements java.io.Serializable {
  transient com.google.appengine.repackaged.com.google.common.collect.ObjectCountHashMap<E> backingMap;
  transient long size;
  com.google.appengine.repackaged.com.google.common.collect.AbstractMapBasedMultiset(int);
  abstract void init(int);
  public final int count(java.lang.Object);
  public final int add(E, int);
  public final int remove(java.lang.Object, int);
  public final int setCount(E, int);
  public final boolean setCount(E, int, int);
  public final void clear();
  final java.util.Iterator<E> elementIterator();
  final java.util.Iterator<com.google.appengine.repackaged.com.google.common.collect.Multiset$Entry<E>> entryIterator();
  void addTo(com.google.appengine.repackaged.com.google.common.collect.Multiset<? super E>);
  final int distinctElements();
  public final java.util.Iterator<E> iterator();
  public final int size();
}

How come HashMultiset is from appengine-api-1.0-sdk version 1.9.86 and its parent AbstractMapBasedMultiset is from version 1.9.71?

@suztomo
Copy link
Contributor Author

suztomo commented Mar 24, 2021

The test in google-auth-library-java's appengine module doesn't run. Skipping it for now.

suztomo-macbookpro44% pwd
/var/folders/2d/zj9lyxqn7sb_0986sl5hyk9h00kd2p/T/lts-test1319721916007069469/google-auth-library-java
suztomo-macbookpro44% mvn -B -V -ntp test \
          -pl appengine \
          -Dclirr.skip=true \
          -Denforcer.skip=true \
          -Dmaven.javadoc.skip=true \
          -Dgcloud.download.skip=true \
          -T 1C
Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T15:00:29-04:00)
Maven home: /Users/suztomo/local/apache-maven-3.6.1
Java version: 1.8.0_221, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.google.auth:google-auth-library-oauth2-http:jar:0.25.2
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-failsafe-plugin @ line 99, column 15
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.google.auth:google-auth-library-bom:pom:0.25.2
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 116, column 13
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO] 
[INFO] Using the MultiThreadedBuilder implementation with a thread count of 4
[INFO] 
[INFO] -----------< com.google.auth:google-auth-library-appengine >------------
[INFO] Building Google Auth Library for Java - Google App Engine 0.25.2
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.0.0:check (checkstyle) @ google-auth-library-appengine ---
[INFO] Starting audit...
Audit done.
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.6:prepare-agent (default) @ google-auth-library-appengine ---
[INFO] argLine set to -javaagent:/Users/suztomo/.m2/repository/org/jacoco/org.jacoco.agent/0.8.6/org.jacoco.agent-0.8.6-runtime.jar=destfile=/private/var/folders/2d/zj9lyxqn7sb_0986sl5hyk9h00kd2p/T/lts-test1319721916007069469/google-auth-library-java/appengine/target/jacoco.exec
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ google-auth-library-appengine ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /private/var/folders/2d/zj9lyxqn7sb_0986sl5hyk9h00kd2p/T/lts-test1319721916007069469/google-auth-library-java/appengine/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ google-auth-library-appengine ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ google-auth-library-appengine ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /private/var/folders/2d/zj9lyxqn7sb_0986sl5hyk9h00kd2p/T/lts-test1319721916007069469/google-auth-library-java/appengine/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ google-auth-library-appengine ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ google-auth-library-appengine ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[ERROR] com/google/auth/oauth2/BaseSerializationTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.484 s (Wall Clock)
[INFO] Finished at: 2021-03-24T16:06:50-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project google-auth-library-appengine: There are test failures.
[ERROR] 
[ERROR] Please refer to /private/var/folders/2d/zj9lyxqn7sb_0986sl5hyk9h00kd2p/T/lts-test1319721916007069469/google-auth-library-java/appengine/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] There was an error in the forked process
[ERROR] com/google/auth/oauth2/BaseSerializationTest
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] com/google/auth/oauth2/BaseSerializationTest
[ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:733)
[ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)
[ERROR] 	at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)
[ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)
[ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)
[ERROR] 	at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)
[ERROR] 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] 	at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:202)
[ERROR] 	at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:198)
[ERROR] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[ERROR] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[ERROR] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[ERROR] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[ERROR] 	at java.lang.Thread.run(Thread.java:748)
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@suztomo
Copy link
Contributor Author

suztomo commented Mar 24, 2021

java-bigtable-hbase fails with java.lang.NoClassDefFoundError: com/google/api/services/bigquery/model/TableRow.

https://gist.github.com/suztomo/7c3a50d3ab03f0ee62ec00f3ded3d262

The test runs fine if there's no test-runtime dependency override.

com.google.apis:google-api-services-bigquery:v2-rev20200719-1.30.10 has the class.

@suztomo
Copy link
Contributor Author

suztomo commented Mar 24, 2021

Google Map Services needed to have mavenLocal in repository section of build.gradle.

> Could not resolve all files for configuration ':testRuntimeClasspath'.
   > Could not find com.google.cloud:gcp-lts-bom:0.1.0-SNAPSHOT.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/google/cloud/gcp-lts-bom/0.1.0-SNAPSHOT/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/com/google/cloud/gcp-lts-bom/0.1.0-SNAPSHOT/gcp-lts-bom-0.1.0-SNAPSHOT.pom
     Required by:
         project :

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.


@elharo
Copy link
Contributor

elharo commented Mar 25, 2021

It might be a good idea to file bugs in the respective repos for individual failures you're uncovering. We should fix these at head ASAP to have a chance of getting them into the June release.

@suztomo
Copy link
Contributor Author

suztomo commented Mar 25, 2021

Yes, I'll do.
So far I observe that most of the issues above are due to the behaviors of this test tool (such as the need to add mavenLocal). Still there are genuine problem, such as pom.xml without name space declaration.

@suztomo
Copy link
Contributor Author

suztomo commented May 4, 2021

The build that worked fine at the time of the release of a library might not work later due to unstable (or retired) repositories. google-http-java-client repository at git tag v1.31.3 does not work any more due to dl.bintray.com returning 403.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Parent for the Google API Client Library for Java 1.31.3:
[INFO] 
[INFO] Parent for the Google API Client Library for Java .. SUCCESS [  2.717 s]
[INFO] Google APIs Client Library for Java ................ FAILURE [  0.535 s]
[INFO] Servlet and JDO extensions to the Google API Client Library for Java. SKIPPED
[INFO] Android Platform Extensions to the Google APIs Client Library for Java. SUCCESS [  3.885 s]
[INFO] Google App Engine extensions to the Google API Client Library for Java. SKIPPED
[INFO] GSON extensions to the Google APIs Client Library for Java SKIPPED
[INFO] Jackson 2 extensions to the Google APIs Client Library for Java SKIPPED
[INFO] Java 6 (and higher) Extensions to the Google API Client Library for Java. SKIPPED
[INFO] Protocol Buffer extensions to the Google APIs Client Library for Java SKIPPED
[INFO] XML extensions to the Google APIs Client Library for Java SKIPPED
[INFO] Assembly for the Google APIs Client Library for Java SKIPPED
[INFO] Google API Client Library for Java BOM ............. SUCCESS [  0.084 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  17.913 s (Wall Clock)
[INFO] Finished at: 2021-05-03T21:48:04Z
[INFO] ------------------------------------------------------------------------
Error:  Plugin com.google.protobuf.tools:maven-protoc-plugin:0.4.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.google.protobuf.tools:maven-protoc-plugin:jar:0.4.2: Could not transfer artifact com.google.protobuf.tools:maven-protoc-plugin:pom:0.4.2 from/to protoc-plugin (https://dl.bintray.com/sergei-ivanov/maven/): Authorization failed for https://dl.bintray.com/sergei-ivanov/maven/com/google/protobuf/tools/maven-protoc-plugin/0.4.2/maven-protoc-plugin-0.4.2.pom 403 Forbidden -> [Help 1]

@elharo elharo added enhancement New feature or request p3 labels Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request p3
Projects
None yet
Development

No branches or pull requests

2 participants