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

[Java][CI] JdbcToArrowCommentMetadataTest fails on Java Linux Conda release verification job #35932

Closed
Tracked by #35945
raulcd opened this issue Jun 6, 2023 · 3 comments · Fixed by #35940
Closed
Tracked by #35945

Comments

@raulcd
Copy link
Member

raulcd commented Jun 6, 2023

Describe the bug, including details regarding any error messages, version, and platform.

Nightly verification tasks for verify-rc-source-java-linux-conda-latest-amd64 has been failing for the last 7 days. The commits introduced on that day are:
431785f...95df6cc

This is also failing currently on the RC0 for 12.0.1, see: #35931

The error log:

Error:  Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.846 s <<< FAILURE! - in org.apache.arrow.adapter.jdbc.JdbcToArrowCommentMetadataTest
Error:  org.apache.arrow.adapter.jdbc.JdbcToArrowCommentMetadataTest.schemaCommentWithDatabaseMetadata  Time elapsed: 0.784 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: 

expected: 
  "{
    "fields" : [ {
      "name" : "ID",
      "nullable" : false,
      "type" : {
        "name" : "int",
        "bitWidth" : 64,
        "isSigned" : true
      },
      "children" : [ ],
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
	at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:55)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.lambda$execute$1(JUnitPlatformProvider.java:234)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:228)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:175)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:131)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581)

[INFO] Running org.apache.arrow.adapter.jdbc.JdbcFieldInfoTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.014 s - in org.apache.arrow.adapter.jdbc.JdbcFieldInfoTest
[INFO] Running org.apache.arrow.adapter.jdbc.h2.JdbcToArrowArrayTest
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.112 s - in org.apache.arrow.adapter.jdbc.h2.JdbcToArrowArrayTest
[INFO] Running org.apache.arrow.adapter.jdbc.h2.JdbcToArrowOptionalColumnsTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.025 s - in org.apache.arrow.adapter.jdbc.h2.JdbcToArrowOptionalColumnsTest
[INFO] Running org.apache.arrow.adapter.jdbc.h2.JdbcToArrowVectorIteratorTest
[INFO] Tests run: 29, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.892 s - in org.apache.arrow.adapter.jdbc.JdbcParameterBinderTest
[INFO] Running org.apache.arrow.adapter.jdbc.h2.JdbcToArrowDataTypesTest
[INFO] Tests run: 38, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.936 s - in org.apache.arrow.adapter.jdbc.h2.JdbcToArrowDataTypesTest
[INFO] Running org.apache.arrow.adapter.jdbc.h2.JdbcToArrowTest
[INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.63 s - in org.apache.arrow.adapter.jdbc.h2.JdbcToArrowVectorIteratorTest
[INFO] Running org.apache.arrow.adapter.jdbc.h2.JdbcToArrowNullTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.399 s - in org.apache.arrow.adapter.jdbc.h2.JdbcToArrowNullTest
[INFO] Running org.apache.arrow.adapter.jdbc.h2.JdbcToArrowTimeZoneTest
[INFO] Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.147 s - in org.apache.arrow.adapter.jdbc.h2.JdbcToArrowTimeZoneTest
[INFO] Running org.apache.arrow.adapter.jdbc.h2.JdbcToArrowMapDataTypeTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.079 s - in org.apache.arrow.adapter.jdbc.h2.JdbcToArrowMapDataTypeTest
[INFO] Running org.apache.arrow.adapter.jdbc.h2.JdbcToArrowCharSetTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.123 s - in org.apache.arrow.adapter.jdbc.h2.JdbcToArrowTest
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.182 s - in org.apache.arrow.adapter.jdbc.h2.JdbcToArrowCharSetTest
[INFO] Running org.apache.arrow.adapter.jdbc.JdbcToArrowConfigTest
[INFO] Running org.apache.arrow.adapter.jdbc.h2.JdbcAliasToArrowTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 s - in org.apache.arrow.adapter.jdbc.h2.JdbcAliasToArrowTest
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.035 s - in org.apache.arrow.adapter.jdbc.JdbcToArrowConfigTest
[INFO] 
[INFO] Results:
[INFO] 
Error:  Failures: 
Error:    JdbcToArrowCommentMetadataTest.schemaCommentWithDatabaseMetadata:95 
expected: 
  "{
    "fields" : [ {
      "name" : "ID",
      "nullable" : false,
      "type" : {
        "name" : "int",
        "bitWidth" : 64,
        "isSigned" : true
      },
      "children" : [ ],
      "metadata" : [ {
        "value" : "PUBLIC",
        "key" : "SQL_SCHEMA_NAME"
      }, {
        "value" : "JDBCTOARROWTEST?CHARACTERENCODING=UTF-8",
        "key" : "SQL_CATALOG_NAME"
      }, {
        "value" : "ID",
        "key" : "SQL_COLUMN_NAME"
      }, {
        "value" : "BIGINT",
        "key" : "SQL_TYPE"
      }, {
        "value" : "Record identifier",
        "key" : "comment"
      }, {
        "value" : "TABLE1",
        "key" : "SQL_TABLE_NAME"
      } ]
    }, {
      "name" : "NAME",
      "nullable" : true,
      "type" : {
        "name" : "utf8"
      },
      "children" : [ ],
      "metadata" : [ {
        "value" : "PUBLIC",
        "key" : "SQL_SCHEMA_NAME"
      }, {
        "value" : "JDBCTOARROWTEST?CHARACTERENCODING=UTF-8",
        "key" : "SQL_CATALOG_NAME"
      }, {
        "value" : "NAME",
        "key" : "SQL_COLUMN_NAME"
      }, {
        "value" : "VARCHAR",
        "key" : "SQL_TYPE"
      }, {
        "value" : "Name of record",
        "key" : "comment"
      }, {
        "value" : "TABLE1",
        "key" : "SQL_TABLE_NAME"
      } ]
    }, {
      "name" : "COLUMN1",
      "nullable" : true,
      "type" : {
        "name" : "bool"
      },
      "children" : [ ],
      "metadata" : [ {
        "value" : "PUBLIC",
        "key" : "SQL_SCHEMA_NAME"
      }, {
        "value" : "TABLE1",
        "key" : "SQL_TABLE_NAME"
      }, {
        "value" : "JDBCTOARROWTEST?CHARACTERENCODING=UTF-8",
        "key" : "SQL_CATALOG_NAME"
      }, {
        "value" : "COLUMN1",
        "key" : "SQL_COLUMN_NAME"
      }, {
        "value" : "BOOLEAN",
        "key" : "SQL_TYPE"
      } ]
    }, {
      "name" : "COLUMNN",
      "nullable" : true,
      "type" : {
        "name" : "int",
        "bitWidth" : 32,
        "isSigned" : true
      },
      "children" : [ ],
      "metadata" : [ {
        "value" : "PUBLIC",
        "key" : "SQL_SCHEMA_NAME"
      }, {
        "value" : "JDBCTOARROWTEST?CHARACTERENCODING=UTF-8",
        "key" : "SQL_CATALOG_NAME"
      }, {
        "value" : "COLUMNN",
        "key" : "SQL_COLUMN_NAME"
      }, {
        "value" : "INTEGER",
        "key" : "SQL_TYPE"
      }, {
        "value" : "Informative description of columnN",
        "key" : "comment"
      }, {
        "value" : "TABLE1",
        "key" : "SQL_TABLE_NAME"
      } ]
    } ],
    "metadata" : [ {
      "value" : "This is super special table with valuable data",
      "key" : "comment"
    } ]
  }"
 but was: 
  "{
    "fields" : [ {
      "name" : "ID",
      "nullable" : false,
      "type" : {
        "name" : "int",
        "bitWidth" : 64,
        "isSigned" : true
      },
      "children" : [ ],
      "metadata" : [ {
        "value" : "Record identifier",
        "key" : "comment"
      }, {
        "value" : "PUBLIC",
        "key" : "SQL_SCHEMA_NAME"
      }, {
        "value" : "TABLE1",
        "key" : "SQL_TABLE_NAME"
      }, {
        "value" : "JDBCTOARROWTEST?CHARACTERENCODING=UTF-8",
        "key" : "SQL_CATALOG_NAME"
      }, {
        "value" : "ID",
        "key" : "SQL_COLUMN_NAME"
      }, {
        "value" : "BIGINT",
        "key" : "SQL_TYPE"
      } ]
    }, {
      "name" : "NAME",
      "nullable" : true,
      "type" : {
        "name" : "utf8"
      },
      "children" : [ ],
      "metadata" : [ {
        "value" : "Name of record",
        "key" : "comment"
      }, {
        "value" : "PUBLIC",
        "key" : "SQL_SCHEMA_NAME"
      }, {
        "value" : "TABLE1",
        "key" : "SQL_TABLE_NAME"
      }, {
        "value" : "JDBCTOARROWTEST?CHARACTERENCODING=UTF-8",
        "key" : "SQL_CATALOG_NAME"
      }, {
        "value" : "NAME",
        "key" : "SQL_COLUMN_NAME"
      }, {
        "value" : "VARCHAR",
        "key" : "SQL_TYPE"
      } ]
    }, {
      "name" : "COLUMN1",
      "nullable" : true,
      "type" : {
        "name" : "bool"
      },
      "children" : [ ],
      "metadata" : [ {
        "value" : "PUBLIC",
        "key" : "SQL_SCHEMA_NAME"
      }, {
        "value" : "TABLE1",
        "key" : "SQL_TABLE_NAME"
      }, {
        "value" : "JDBCTOARROWTEST?CHARACTERENCODING=UTF-8",
        "key" : "SQL_CATALOG_NAME"
      }, {
        "value" : "COLUMN1",
        "key" : "SQL_COLUMN_NAME"
      }, {
        "value" : "BOOLEAN",
        "key" : "SQL_TYPE"
      } ]
    }, {
      "name" : "COLUMNN",
      "nullable" : true,
      "type" : {
        "name" : "int",
        "bitWidth" : 32,
        "isSigned" : true
      },
      "children" : [ ],
      "metadata" : [ {
        "value" : "Informative description of columnN",
        "key" : "comment"
      }, {
        "value" : "PUBLIC",
        "key" : "SQL_SCHEMA_NAME"
      }, {
        "value" : "TABLE1",
        "key" : "SQL_TABLE_NAME"
      }, {
        "value" : "JDBCTOARROWTEST?CHARACTERENCODING=UTF-8",
        "key" : "SQL_CATALOG_NAME"
      }, {
        "value" : "COLUMNN",
        "key" : "SQL_COLUMN_NAME"
      }, {
        "value" : "INTEGER",
        "key" : "SQL_TYPE"
      } ]
    } ],
    "metadata" : [ {
      "value" : "This is super special table with valuable data",
      "key" : "comment"
    } ]
  }"
[INFO] 
Error:  Tests run: 151, Failures: 1, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Apache Arrow Java Root POM 12.0.1:
[INFO] 
[INFO] Apache Arrow Java Root POM ......................... SUCCESS [  9.116 s]
[INFO] Arrow Format ....................................... SUCCESS [  7.484 s]
[INFO] Arrow Memory ....................................... SUCCESS [  0.194 s]
[INFO] Arrow Memory - Core ................................ SUCCESS [ 15.246 s]
[INFO] Arrow Memory - Unsafe .............................. SUCCESS [  4.883 s]
[INFO] Arrow Memory - Netty ............................... SUCCESS [  9.925 s]
[INFO] Arrow Vectors ...................................... SUCCESS [01:54 min]
[INFO] Arrow Compression .................................. SUCCESS [  7.758 s]
[INFO] Arrow Tools ........................................ SUCCESS [  8.603 s]
[INFO] Arrow JDBC Adapter ................................. FAILURE [ 23.290 s]
[INFO] Arrow Flight ....................................... SKIPPED
[INFO] Arrow Flight Core .................................. SKIPPED
[INFO] Arrow Flight GRPC .................................. SKIPPED
[INFO] Arrow Flight SQL ................................... SKIPPED
[INFO] Arrow Flight SQL JDBC Driver Core .................. SKIPPED
[INFO] Arrow Flight SQL JDBC Driver ....................... SKIPPED
[INFO] Arrow Flight Integration Tests ..................... SKIPPED
[INFO] Arrow AVRO Adapter ................................. SKIPPED
[INFO] Arrow Algorithms ................................... SKIPPED
[INFO] Arrow Performance Benchmarks ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:23 min
[INFO] Finished at: 2023-06-06T08:38:01Z
[INFO] ------------------------------------------------------------------------
Warning:  
Warning:  Plugin validation issues were detected in 9 plugin(s)
Warning:  
Warning:   * org.apache.maven.plugins:maven-checkstyle-plugin:3.1.0
Warning:   * org.apache.maven.plugins:maven-remote-resources-plugin:1.5
Warning:   * org.apache.maven.plugins:maven-resources-plugin:2.6
Warning:   * org.apache.maven.plugins:maven-compiler-plugin:3.10.1
Warning:   * org.apache.maven.plugins:maven-site-plugin:3.5.1
Warning:   * org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7
Warning:   * pl.project13.maven:git-commit-id-plugin:4.0.5
Warning:   * org.apache.drill.tools:drill-fmpp-maven-plugin:1.5.0
Warning:   * org.apache.rat:apache-rat-plugin:0.13
Warning:  
Warning:  For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
Warning:  
Error:  Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M7:test (default-test) on project arrow-jdbc: There are test failures.
Error:  
Error:  Please refer to /tmp/arrow-12.0.1.WDMsv/apache-arrow-12.0.1/java/adapter/jdbc/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:  -> [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/MojoFailureException
Error:  
Error:  After correcting the problems, you can resume the build with the command
Error:    mvn <args> -rf :arrow-jdbc
Failed to verify release candidate. See /tmp/arrow-12.0.1.WDMsv for details.

I am unsure on what the problem is and whether this would require a new RC to be created for 12.0.1.

Component(s)

Continuous Integration, Java

@raulcd
Copy link
Member Author

raulcd commented Jun 6, 2023

@lidavidm @davisusanibar any idea what might be going on here? I am not sure if we would require a new RC for 12.0.1.

@raulcd
Copy link
Member Author

raulcd commented Jun 6, 2023

Link to job that failed on 12.0.1 RC0 PR: https://github.com/ursacomputing/crossbow/actions/runs/5186370758/attempts/2

@lidavidm
Copy link
Member

lidavidm commented Jun 6, 2023

Ugh, this is because the test is written in a brittle way. The values are the same, but it's comparing string representations so it's sensitive to the order of fields.

raulcd added a commit to raulcd/arrow that referenced this issue Jun 6, 2023
lidavidm added a commit to lidavidm/arrow that referenced this issue Jun 6, 2023
lidavidm added a commit to lidavidm/arrow that referenced this issue Jun 6, 2023
@raulcd raulcd assigned lidavidm and unassigned raulcd Jun 6, 2023
raulcd pushed a commit that referenced this issue Jun 6, 2023
### Rationale for this change

A JDBC test is brittle because it compares string representations.

### What changes are included in this PR?

Compare values directly.

### Are these changes tested?

N/A

### Are there any user-facing changes?

No.
* Closes: #35932

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
@raulcd raulcd added this to the 12.0.1 milestone Jun 6, 2023
raulcd pushed a commit that referenced this issue Jun 7, 2023
### Rationale for this change

A JDBC test is brittle because it compares string representations.

### What changes are included in this PR?

Compare values directly.

### Are these changes tested?

N/A

### Are there any user-facing changes?

No.
* Closes: #35932

Authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment