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

Flaky tests in trino-main & others: surefire sometimes fails: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" #14618

Closed
findepi opened this issue Oct 13, 2022 · 37 comments
Labels
bug Something isn't working test

Comments

@findepi
Copy link
Member

findepi commented Oct 13, 2022

eg https://github.com/trinodb/trino/actions/runs/3237106331/jobs/5306229110

[INFO] Results:
[INFO] 
[INFO] Tests run: 682, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/testng/testng/5.10/testng-5.10.pom
[INFO] Failure detected.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  05:44 min
[INFO] Finished at: 2022-10-12T23:08:40Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project trino-main: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null -> [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/PluginExecutionException
Error: Process completed with exit code 1.
@findepi
Copy link
Member Author

findepi commented Oct 13, 2022

cc @kokosing

@findepi
Copy link
Member Author

findepi commented Oct 13, 2022

https://github.com/trinodb/trino/actions/runs/3241747761/jobs/5314824158 second time for same PR (#14506)
is it deterministic?
is it caused by migration to junit? cc @martint

@electrum
Copy link
Member

It seems possibly related to junit, since it fails after running the junit tests, but before it starts the testng tests.

@findepi
Copy link
Member Author

findepi commented Oct 17, 2022

@Praveen2112
Copy link
Member

Can we try updating it to surefire plugin to a recent version like mentioned here - apache/maven-surefire#504 and https://issues.apache.org/jira/browse/SUREFIRE-2051

@raunaqmorarka
Copy link
Member

I was just looking to surefire plugin upgrade for this but it turns out we rolled that back for some other reasons airlift/airbase#313

@findinpath
Copy link
Contributor

@MiguelWeezardo
Copy link
Member

MiguelWeezardo commented Oct 26, 2022

I think I've found a way to trigger it:

  1. Compile Trino and run tests up until TestNG starts
  2. rm -fr ~/.m2/repository/org/testng/testng/5.10
  3. Disconnect from network
  4. Run tests again

Stacktrace:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project trino-main: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project trino-main: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:47)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:156)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:72)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:47)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:156)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:72)
Caused by: java.lang.NullPointerException: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo$ClasspathCache.setCachedClasspath (AbstractSurefireMojo.java:4121)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo$ClasspathCache.access$200 (AbstractSurefireMojo.java:4102)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.newStartupConfigWithClasspath (AbstractSurefireMojo.java:1913)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.createStartupConfiguration (AbstractSurefireMojo.java:1894)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.createForkStarter (AbstractSurefireMojo.java:2374)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider (AbstractSurefireMojo.java:1310)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:1159)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:932)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:47)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:156)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:72)
[ERROR]
[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/PluginExecutionException

@MiguelWeezardo
Copy link
Member

Log tail with -X:

[DEBUG] Using the provider org.apache.maven.surefire.testng.TestNGProvider
[DEBUG] Setting system property [user.dir]=[/Users/michalslizak/worktrees/benchmarks_dev_guide/core/trino-main]
[DEBUG] Setting system property [sun.jnu.encoding]=[UTF-8]
[DEBUG] Setting system property [gib.referenceBranch]=[refs/remotes/origin/master]
[DEBUG] Setting system property [java.util.logging.SimpleFormatter.format]=[%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tS.%1$tL%1$tz %4$s %5$s%6$s%n]
[DEBUG] Setting system property [git.commit.id.describe]=[398-105-g78c5ef4]
[DEBUG] Setting system property [basedir]=[/Users/michalslizak/worktrees/benchmarks_dev_guide/core/trino-main]
[DEBUG] Setting system property [git.commit.id]=[78c5ef4bd2b084b8ba6c2097903ddca506b7b716]
[DEBUG] Setting system property [air.check.skip-all]=[true]
[DEBUG] Setting system property [java.awt.headless]=[true]
[DEBUG] Setting system property [maven.source.skip]=[true]
[DEBUG] Setting system property [git.build.time]=[2022-10-26T09:17:20+0200]
[DEBUG] Setting system property [localRepository]=[/Users/michalslizak/.m2/repository]
[DEBUG] Found implementation of fork node factory: org.apache.maven.plugin.surefire.extensions.LegacyForkNodeFactory
[DEBUG] Resolving artifact org.testng:testng:pom:5.10 from [sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, default, snapshots), central (https://repo.maven.apache.org/maven2, default, releases), apache.snapshots (https://repository.apache.org/snapshots, default, snapshots)]
[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/testng/testng/5.10/testng-5.10.pom
[DEBUG] Writing tracking file /Users/michalslizak/.m2/repository/org/testng/testng/5.10/testng-5.10.pom.lastUpdated
[INFO] Failure detected.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:12 min
[INFO] Finished at: 2022-10-26T09:20:28+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project trino-main: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project trino-main: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:47)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:156)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:72)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:47)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:156)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:72)
Caused by: java.lang.NullPointerException: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null
    at org.apache.maven.plugin.surefire.SurefireDependencyResolver.getProviderClasspath (SurefireDependencyResolver.java:218)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo$TestNgProviderInfo.getProviderClasspath (AbstractSurefireMojo.java:3079)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.newStartupConfigWithClasspath (AbstractSurefireMojo.java:1908)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.createStartupConfiguration (AbstractSurefireMojo.java:1894)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.createForkStarter (AbstractSurefireMojo.java:2374)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider (AbstractSurefireMojo.java:1310)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:1159)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:932)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:47)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:156)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:72)
[ERROR]
[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/PluginExecutionException

@kokosing
Copy link
Member

Is this testng specific? Is there any issue for this in maven or for surefire plugin?

@sopel39
Copy link
Member

sopel39 commented Oct 26, 2022

@MiguelWeezardo
Copy link
Member

MiguelWeezardo commented Oct 26, 2022

Is this testng specific? Is there any issue for this in maven or for surefire plugin?

Looks like a bug in Surefire, supposedly "fixed" in 3.0.0-M6 (by "fixed" I mean it won't help if the network is down, but at least it will propagate the network error and not hide it behind a NPE)

@findepi
Copy link
Member Author

findepi commented Oct 26, 2022

Latest master build also failed with this https://github.com/trinodb/trino/actions/runs/3328105585/jobs/5504695733

This looks like we're not running all trino-main tests on master

image

I will therefore mark this as a release blocker.

@nineinchnick
Copy link
Member

Looks like it fails to download testng 5.10, which is a really old version and it's jar is missing on maven central. I wonder what requires it and if that changed recently.

@MiguelWeezardo
Copy link
Member

MiguelWeezardo commented Oct 26, 2022

@findepi I see we rolled back Surefire from 3.0.0-M6 to 3.0.0-M5 in Airbase. Do you think it's worth working through those new M6 issues? Is there a list of them or a Slack thread? Note that M6 will only make our network problem more visible. It might be a temporary Maven Central glitch, or a networking issue in GitHub.

@MiguelWeezardo
Copy link
Member

Looks like it fails to download testng 5.10, which is a really old version and it's jar is missing on maven central. I wonder what requires it and if that changed recently.

Is it gone permanently or intermittently? I can see it on Maven Central's web page

@nineinchnick
Copy link
Member

This fails:

mvn dependency:get -DgroupId=org.testng -DartifactId=testng -Dversion=5.10 -Dtransitive=false 

@MiguelWeezardo
Copy link
Member

I guess we should update the dependecy anyway, regardless of any other fixes, as that version is 12 years old.

@nineinchnick
Copy link
Member

Airbase should be using 6.10: https://github.com/airlift/airbase/blob/master/airbase/pom.xml#L205 and we don't override it in Trino. I'm checking where does 5.10 come from.

@MiguelWeezardo
Copy link
Member

MiguelWeezardo commented Oct 26, 2022

It seems Maven Central TestNG 5.10 repo has specific JARs for JDK 1.4 and JDK 1.5, but there's no general-purpose JAR.

@MiguelWeezardo
Copy link
Member

MiguelWeezardo commented Oct 26, 2022

It turns out Surefire only needs TestNG 5.10 POM, it doesn't need the JAR. Once I re-enabled my laptop's wifi, tests started passing beyond the failure point, but my local repo only has TestNG 5.10 POM:

14:55 $ ls -al ~/.m2/repository/org/testng/testng/5.10
total 12
drwxr-xr-x 5 michalslizak staff  160 Oct 26 14:46 .
drwxr-xr-x 5 michalslizak staff  160 Oct 26 09:16 ..
-rw-r--r-- 1 michalslizak staff  159 Oct 26 14:46 _remote.repositories
-rw-r--r-- 1 michalslizak staff 2115 Oct 26 14:46 testng-5.10.pom
-rw-r--r-- 1 michalslizak staff   40 Oct 26 14:46 testng-5.10.pom.sha1

@nineinchnick
Copy link
Member

The only thing we can do to improve resiliency is to make sure this version of TestNG is cached in the local Maven repo.

Right now the cache can be created by one of the jobs like maven-checks or error-prone-checks. We have to ensure only one job creates the cache (clear the local repo in other jobs) and ensure it gets as many dependencies as possible. It could either run some testng test or just download this version manually by running this explicitly:

mvn dependency:get -Dartifact=org.testng:testng:5.10 -Dclassifier=jdk15 -Dtransitive=false

@MiguelWeezardo
Copy link
Member

build-pt would be the best job to use as cache source as it builds EVERYTHING

@findepi
Copy link
Member Author

findepi commented Nov 18, 2022

@findepi I see we rolled back Surefire from 3.0.0-M6 to 3.0.0-M5 in Airbase. Do you think it's worth working through those new M6 issues? Is there a list of them or a Slack thread?

i don't know what the problems were.

It turns out Surefire only needs TestNG 5.10 POM, it doesn't need the JAR.

I guess because surefire is compiled against that version, but use is still in control which version is used at runtime.
(btw this is why surefire has lots of reflective code, as it supports a wide version range)

@nineinchnick @MiguelWeezardo
i think the current status is that it is a test flakiness, not a product problem, and related to network issues.

I added the RELEASE-BLOCKER label because it seemed that we're not running all tests on master, so we don't know whether we can trust our releases. Can you confirm we have enough knowledge to remove this label? Would be good to unblock releases. cc @colebow

@nineinchnick
Copy link
Member

it seemed that we're not running all tests on master,

Why? Because they get interrupted and we don't wait for a green run before merging more changes or doing releases? AFAIK we run all tests on master.

There was a release recently, so is the RELEASE-BLOCKER label effective at all?

@findepi
Copy link
Member Author

findepi commented Nov 18, 2022

AFAIK we run all tests on master.

We attempt to.

it seemed that we're not running all tests on master,

Why? Because they get interrupted

That was my understanding.

I don't know what's the current state.
https://github.com/trinodb/trino/commits/master is a sea of red with a green island, so maybe tests don't matter at all.

There was a release recently, so is the RELEASE-BLOCKER label effective at all?

I think for this particular issue it was offline deemed as "not really a blocker". Not my decision. However, if we can safely remove the label from here, it would be good.

For label in general --

@findepi
Copy link
Member Author

findepi commented Jan 27, 2023

@MiguelWeezardo did you solve the issue? I haven't experienced it recently

@MiguelWeezardo
Copy link
Member

MiguelWeezardo commented Jan 27, 2023

@MiguelWeezardo did you solve the issue? I haven't experienced it recently

I haven't done anything, maybe it was temporary or someone re-uploaded. Or it was fixed by improved caching, although I don't see how it could get cached if it was missing.

@nineinchnick
Copy link
Member

I think this helped: 527abc5. We also did improve how we cache the local Maven repository a few months ago, like making sure even a slightly stale cache is restored, hoping that most artifacts will be reused: #14882

If you're wondering if this issue can be closed, I think yes. We can reopen if necessary.

@MiguelWeezardo
Copy link
Member

@MiguelWeezardo did you solve the issue? I haven't experienced it recently

After refreshing my memory of this issue I will credit this to putting the responsibility of updating GitHub cache on one CI job 😆
We'd get this error if a POM file was not in the current GH Maven cache artifact and couldn't be downloaded from Maven Central - two independent transient events with low probability, but when both happen the chances of reoccurence are high.
We used to have jobs which updated the cache but didn't call Surefire, so it's dependencies were not cached.
While this cache entry existed, all builds which had the same pom.xmls would use it and become as flaky as Maven Central.

@findepi
Copy link
Member Author

findepi commented Jan 27, 2023

thank you guys for confirming!

@findepi findepi closed this as completed Jan 27, 2023
@findepi
Copy link
Member Author

findepi commented Feb 1, 2023

https://github.com/trinodb/trino/actions/runs/4064936716/jobs/6998972779

2023-02-01T15:16:50.5057630Z 2023-02-01T09:16:50.423-0600 INFO [AFTER CLASS] io.trino.plugin.thrift.server.TestListBasedRecordSet
2023-02-01T15:16:50.5058365Z 2023-02-01T09:16:50.466-0600 INFO ManageTestResources.onFinish: running checks
2023-02-01T15:16:50.5084695Z [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.239 s - in io.trino.plugin.thrift.server.TestListBasedRecordSet
2023-02-01T15:16:50.5332281Z [INFO] 
2023-02-01T15:16:50.5384743Z [INFO] Results:
2023-02-01T15:16:50.5385368Z [INFO] 
2023-02-01T15:16:50.5385714Z [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
2023-02-01T15:16:50.5385956Z [INFO] 
2023-02-01T15:16:50.5386543Z [INFO] ------------------------------------------------------------------------
2023-02-01T15:16:50.5386999Z [INFO] Reactor Summary for trino-root 407-SNAPSHOT:
2023-02-01T15:16:50.5387237Z [INFO] 
2023-02-01T15:16:50.5387572Z [INFO] trino-root ......................................... SUCCESS [  0.834 s]
2023-02-01T15:16:50.5387979Z [INFO] trino-testing-services ............................. SUCCESS [  0.739 s]
2023-02-01T15:16:50.5388375Z [INFO] trino-spi .......................................... SUCCESS [  0.254 s]
2023-02-01T15:16:50.5388756Z [INFO] trino-client ....................................... SUCCESS [  0.054 s]
2023-02-01T15:16:50.5389397Z [INFO] trino-parser ....................................... SUCCESS [  0.149 s]
2023-02-01T15:16:50.5389788Z [INFO] trino-matching ..................................... SUCCESS [  0.037 s]
2023-02-01T15:16:50.5390179Z [INFO] trino-plugin-toolkit ............................... SUCCESS [  0.199 s]
2023-02-01T15:16:50.5390565Z [INFO] trino-array ........................................ SUCCESS [  0.049 s]
2023-02-01T15:16:50.5390939Z [INFO] trino-collect ...................................... SUCCESS [  0.029 s]
2023-02-01T15:16:50.5391332Z [INFO] trino-geospatial-toolkit ........................... SUCCESS [  0.055 s]
2023-02-01T15:16:50.5391738Z [INFO] trino-memory-context ............................... SUCCESS [  0.025 s]
2023-02-01T15:16:50.5392139Z [INFO] trino-testing-containers ........................... SUCCESS [  0.062 s]
2023-02-01T15:16:50.5392554Z [INFO] trino-exchange-filesystem .......................... SUCCESS [  0.499 s]
2023-02-01T15:16:50.5392942Z [INFO] trino-tpch ......................................... SUCCESS [  0.073 s]
2023-02-01T15:16:50.5393301Z [INFO] trino-testing ...................................... SUCCESS [ 12.753 s]
2023-02-01T15:16:50.5393667Z [INFO] trino-blackhole .................................... SUCCESS [ 27.523 s]
2023-02-01T15:16:50.5394049Z [INFO] trino-hadoop-toolkit ............................... SUCCESS [  0.032 s]
2023-02-01T15:16:50.5394511Z [INFO] trino-hdfs ......................................... SUCCESS [  0.049 s]
2023-02-01T15:16:50.5394885Z [INFO] trino-filesystem ................................... SUCCESS [  0.051 s]
2023-02-01T15:16:50.5395246Z [INFO] trino-orc .......................................... SUCCESS [  0.152 s]
2023-02-01T15:16:50.5395605Z [INFO] trino-benchmark .................................... SUCCESS [  0.072 s]
2023-02-01T15:16:50.5395981Z [INFO] trino-parquet ...................................... SUCCESS [01:33 min]
2023-02-01T15:16:50.5396350Z [INFO] trino-rcfile ....................................... SUCCESS [  0.056 s]
2023-02-01T15:16:50.5396719Z [INFO] trino-tpcds ........................................ SUCCESS [01:37 min]
2023-02-01T15:16:50.5397100Z [INFO] trino-hive-hadoop2 ................................. SUCCESS [ 11.451 s]
2023-02-01T15:16:50.5397493Z [INFO] trino-thrift-api ................................... SUCCESS [  3.319 s]
2023-02-01T15:16:50.5397879Z [INFO] trino-record-decoder ............................... SUCCESS [  0.161 s]
2023-02-01T15:16:50.5398251Z [INFO] trino-atop ......................................... SUCCESS [  7.024 s]
2023-02-01T15:16:50.5398608Z [INFO] trino-jmx .......................................... SUCCESS [ 24.222 s]
2023-02-01T15:16:50.5398981Z [INFO] trino-geospatial ................................... FAILURE [01:00 min]
2023-02-01T15:16:50.5399380Z [INFO] trino-google-sheets ................................ SUCCESS [ 25.891 s]
2023-02-01T15:16:50.5399765Z [INFO] trino-kinesis ...................................... SUCCESS [ 15.394 s]
2023-02-01T15:16:50.5400131Z [INFO] trino-ml ........................................... SUCCESS [ 10.074 s]
2023-02-01T15:16:50.5400491Z [INFO] trino-prometheus ................................... SUCCESS [ 45.185 s]
2023-02-01T15:16:50.5400868Z [INFO] trino-redshift ..................................... SUCCESS [  3.101 s]
2023-02-01T15:16:50.5401276Z [INFO] trino-session-property-managers .................... SUCCESS [ 44.170 s]
2023-02-01T15:16:50.5401752Z [INFO] trino-teradata-functions ........................... SUCCESS [  6.672 s]
2023-02-01T15:16:50.5402170Z [INFO] trino-thrift-testing-server ........................ SUCCESS [  2.600 s]
2023-02-01T15:16:50.5402596Z [INFO] ------------------------------------------------------------------------
2023-02-01T15:16:50.5402872Z [INFO] BUILD FAILURE
2023-02-01T15:16:50.5403229Z [INFO] ------------------------------------------------------------------------
2023-02-01T15:16:50.5403515Z [INFO] Total time:  08:17 min
2023-02-01T15:16:50.5403830Z [INFO] Finished at: 2023-02-01T15:16:50Z
2023-02-01T15:16:50.5404275Z [INFO] ------------------------------------------------------------------------
2023-02-01T15:16:50.5405663Z [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project trino-geospatial: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null -> [Help 1]

@findepi
Copy link
Member Author

findepi commented Feb 1, 2023

https://github.com/trinodb/trino/actions/runs/4065666261/jobs/7000699640

023-02-01T19:13:15.8137541Z [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.223 s - in io.trino.plugin.thrift.server.TestListBasedRecordSet
2023-02-01T19:13:15.8384578Z [INFO] 
2023-02-01T19:13:15.8386366Z [INFO] Results:
2023-02-01T19:13:15.8386801Z [INFO] 
2023-02-01T19:13:15.8387621Z [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
2023-02-01T19:13:15.8387983Z [INFO] 
2023-02-01T19:13:15.8390004Z [INFO] ------------------------------------------------------------------------
2023-02-01T19:13:15.8393690Z [INFO] Reactor Summary for trino-root 407-SNAPSHOT:
2023-02-01T19:13:15.8394142Z [INFO] 
2023-02-01T19:13:15.8394780Z [INFO] trino-root ......................................... SUCCESS [  0.935 s]
2023-02-01T19:13:15.8396134Z [INFO] trino-testing-services ............................. SUCCESS [  0.899 s]
2023-02-01T19:13:15.8469459Z [INFO] trino-spi .......................................... SUCCESS [  0.284 s]
2023-02-01T19:13:15.8470748Z [INFO] trino-client ....................................... SUCCESS [  0.067 s]
2023-02-01T19:13:15.8501549Z [INFO] trino-parser ....................................... SUCCESS [  0.148 s]
2023-02-01T19:13:15.8518987Z [INFO] trino-matching ..................................... SUCCESS [  0.044 s]
2023-02-01T19:13:15.8519421Z [INFO] trino-plugin-toolkit ............................... SUCCESS [  0.217 s]
2023-02-01T19:13:15.8519832Z [INFO] trino-array ........................................ SUCCESS [  0.070 s]
2023-02-01T19:13:15.8520229Z [INFO] trino-collect ...................................... SUCCESS [  0.033 s]
2023-02-01T19:13:15.8520644Z [INFO] trino-geospatial-toolkit ........................... SUCCESS [  0.066 s]
2023-02-01T19:13:15.8521068Z [INFO] trino-memory-context ............................... SUCCESS [  0.021 s]
2023-02-01T19:13:15.8522762Z [INFO] trino-testing-containers ........................... SUCCESS [  0.049 s]
2023-02-01T19:13:15.8523183Z [INFO] trino-exchange-filesystem .......................... SUCCESS [  0.542 s]
2023-02-01T19:13:15.8523584Z [INFO] trino-tpch ......................................... SUCCESS [  0.088 s]
2023-02-01T19:13:15.8523958Z [INFO] trino-testing ...................................... SUCCESS [ 13.073 s]
2023-02-01T19:13:15.8524342Z [INFO] trino-blackhole .................................... SUCCESS [ 28.156 s]
2023-02-01T19:13:15.8524740Z [INFO] trino-hadoop-toolkit ............................... SUCCESS [  0.039 s]
2023-02-01T19:13:15.8525125Z [INFO] trino-hdfs ......................................... SUCCESS [  0.057 s]
2023-02-01T19:13:15.8525494Z [INFO] trino-filesystem ................................... SUCCESS [  0.051 s]
2023-02-01T19:13:15.8525855Z [INFO] trino-orc .......................................... SUCCESS [  0.078 s]
2023-02-01T19:13:15.8526228Z [INFO] trino-benchmark .................................... SUCCESS [  0.069 s]
2023-02-01T19:13:15.8526607Z [INFO] trino-parquet ...................................... SUCCESS [01:35 min]
2023-02-01T19:13:15.8527359Z [INFO] trino-rcfile ....................................... SUCCESS [  0.053 s]
2023-02-01T19:13:15.8527746Z [INFO] trino-tpcds ........................................ SUCCESS [01:45 min]
2023-02-01T19:13:15.8528132Z [INFO] trino-hive-hadoop2 ................................. SUCCESS [ 11.432 s]
2023-02-01T19:13:15.8528521Z [INFO] trino-thrift-api ................................... SUCCESS [  3.343 s]
2023-02-01T19:13:15.8528908Z [INFO] trino-record-decoder ............................... SUCCESS [  0.175 s]
2023-02-01T19:13:15.8529284Z [INFO] trino-atop ......................................... SUCCESS [  6.781 s]
2023-02-01T19:13:15.8529654Z [INFO] trino-jmx .......................................... SUCCESS [ 24.786 s]
2023-02-01T19:13:15.8530032Z [INFO] trino-geospatial ................................... FAILURE [01:00 min]
2023-02-01T19:13:15.8530421Z [INFO] trino-google-sheets ................................ SUCCESS [ 25.400 s]
2023-02-01T19:13:15.8530797Z [INFO] trino-kinesis ...................................... SUCCESS [ 15.574 s]
2023-02-01T19:13:15.8531155Z [INFO] trino-ml ........................................... SUCCESS [ 10.372 s]
2023-02-01T19:13:15.8531523Z [INFO] trino-prometheus ................................... SUCCESS [ 42.126 s]
2023-02-01T19:13:15.8531907Z [INFO] trino-redshift ..................................... SUCCESS [  3.224 s]
2023-02-01T19:13:15.8532336Z [INFO] trino-session-property-managers .................... SUCCESS [ 45.296 s]
2023-02-01T19:13:15.8532773Z [INFO] trino-teradata-functions ........................... SUCCESS [  6.632 s]
2023-02-01T19:13:15.8533192Z [INFO] trino-thrift-testing-server ........................ SUCCESS [  2.598 s]
2023-02-01T19:13:15.8533712Z [INFO] ------------------------------------------------------------------------
2023-02-01T19:13:15.8533985Z [INFO] BUILD FAILURE
2023-02-01T19:13:15.8534364Z [INFO] ------------------------------------------------------------------------
2023-02-01T19:13:15.8534648Z [INFO] Total time:  08:29 min
2023-02-01T19:13:15.8534966Z [INFO] Finished at: 2023-02-01T19:13:15Z
2023-02-01T19:13:15.8535364Z [INFO] ------------------------------------------------------------------------
2023-02-01T19:13:15.8537698Z [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project trino-geospatial: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null -> [Help 1]

@nineinchnick
Copy link
Member

That job failed on downloading junit-jupiter-engine-5.3.2.pom which is weird since in maven-checks the go-offline goal downloaded junit-jupiter-engine-5.8.1.jar.

That's probably a similar case that we observed with the Surefire plugin having some hard-coded dependencies on an old version of TestNG and trying to download it when executing tests, but it's not detected by other tools that build the dependency tree using Maven APIs.

I don't know what we can do about it other than downloading these explicitly in the maven-checks step so they're in the cache, like I suggested in #14618 (comment). @findepi would you be ok with that?

@findepi
Copy link
Member Author

findepi commented Feb 2, 2023

@nineinchnick thanks for through analysis of the problem!

I don't know what we can do about it other than downloading these explicitly

let's do that

@nineinchnick
Copy link
Member

#15797 will make sure these dependencies are downloaded.

@findepi findepi changed the title Flaky tests in trino-main: surefire sometimes fails: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" Flaky tests in trino-main & others: surefire sometimes fails: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" Feb 27, 2023
@findepi
Copy link
Member Author

findepi commented Feb 27, 2023

https://github.com/trinodb/trino/actions/runs/4075799341/jobs/7022685485

2023-02-02T18:40:24.4732376Z [INFO] Finished at: 2023-02-02T18:40:24Z
2023-02-02T18:40:24.4732912Z [INFO] ------------------------------------------------------------------------
2023-02-02T18:40:24.4734680Z [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project trino-geospatial: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failed: Cannot invoke "java.io.File.getAbsolutePath()" because the return value of "org.apache.maven.artifact.Artifact.getFile()" is null -> [Help 1]
2023-02-02T18:40:24.4735538Z [ERROR] 
2023-02-02T18:40:24.4736317Z [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
2023-02-02T18:40:24.4736960Z [ERROR] Re-run Maven using the -X switch to enable full debug logging.
2023-02-02T18:40:24.4737566Z [ERROR] 
2023-02-02T18:40:24.4738114Z [ERROR] For more information about the errors and possible solutions, please read the following articles:
2023-02-02T18:40:24.4738978Z [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
2023-02-02T18:40:24.4739433Z [ERROR] 
2023-02-02T18:40:24.4740119Z [ERROR] After correcting the problems, you can resume the build with the command
2023-02-02T18:40:24.4740982Z [ERROR]   mvn <args> -rf :trino-geospatial
2023-02-02T18:40:24.5037592Z ##[error]Process completed with exit cod

but it could have been run before #15797 got merged ...

let's optimistically close and reopen if re-observed

@findepi findepi closed this as completed Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test
Development

No branches or pull requests

10 participants