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

fix(java): make field accessible to address Java 17 issue with arrow #2165

Merged
merged 7 commits into from
Jul 22, 2022

Conversation

mpeddada1
Copy link
Contributor

@mpeddada1 mpeddada1 commented Jul 14, 2022

Fixes #2060

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Jul 14, 2022
@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

  • .kokoro/build.sh

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/java-bigquery API. label Jul 14, 2022
@mpeddada1 mpeddada1 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 14, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 14, 2022
@mpeddada1 mpeddada1 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 14, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 14, 2022
@mpeddada1 mpeddada1 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 14, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 14, 2022
@mpeddada1 mpeddada1 added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed kokoro:run Add this label to force Kokoro to re-run the tests. labels Jul 14, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 14, 2022
@mpeddada1
Copy link
Contributor Author

ITNightlyBigQueryTest:testIterateAndOrder is resulting in an NPE. Rerunning tests.

@mpeddada1 mpeddada1 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 14, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 14, 2022
@mpeddada1 mpeddada1 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 15, 2022
@yoshi-kokoro yoshi-kokoro removed kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jul 15, 2022
@mpeddada1 mpeddada1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 18, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 18, 2022
@mpeddada1
Copy link
Contributor Author

All checks are passing.

@mpeddada1 mpeddada1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 18, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 18, 2022
@mpeddada1 mpeddada1 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 18, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 18, 2022
@mpeddada1
Copy link
Contributor Author

ITNightlyBigQueryTest:testIterateAndOrder is being slightly flaky again.

@mpeddada1 mpeddada1 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 18, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 18, 2022
@mpeddada1
Copy link
Contributor Author

ITBigqueryTest is resulting in the following issue:

Failures (1):
  JUnit Vintage:ITBigQueryTest:testBQResultSetPagination
    MethodSource [className = 'com.google.cloud.bigquery.it.ITBigQueryTest', methodName = 'testBQResultSetPagination', methodParameterTypes = '']
    => java.lang.NullPointerException
       com.google.cloud.bigquery.Schema.fromPb(Schema.java:96)
       com.google.cloud.bigquery.ConnectionImpl.getSubsequentQueryResultsWithJob(ConnectionImpl.java:685)
       com.google.cloud.bigquery.ConnectionImpl.queryRpc(ConnectionImpl.java:327)
       com.google.cloud.bigquery.ConnectionImpl.executeSelect(ConnectionImpl.java:195)
       com.google.cloud.bigquery.it.ITBigQueryTest.testBQResultSetPagination(ITBigQueryTest.java:2676)
       java.lang.reflect.Method.invoke(Method.java:566)
       org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
       org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
       org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
       org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
       [...]

@mpeddada1
Copy link
Contributor Author

mpeddada1 commented Jul 20, 2022

All checks are passing now. However, ITBigqueryTest and ITNightlyBigqueryTest have been more flaky given the introduction of these two additional native image checks.

@mpeddada1 mpeddada1 added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 20, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 20, 2022
@mpeddada1 mpeddada1 marked this pull request as ready for review July 20, 2022 15:00
@mpeddada1 mpeddada1 requested a review from a team as a code owner July 20, 2022 15:00
@mpeddada1 mpeddada1 requested review from a team and shollyman July 20, 2022 15:00
@mpeddada1 mpeddada1 changed the title fix(java): troubleshoot Java 17 issue with arrow fix(java): make field accessible to address Java 17 issue with arrow Jul 21, 2022
.kokoro/build.sh Outdated
# Run Unit and Integration Tests with Native Image. Skip Arrow tests until https://github.com/googleapis/java-bigquery/issues/2060 is fixed.
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test "-Dtest=!com.google.cloud.bigquery.it.ITBigQueryTest#testBQResultSetPaginationSlowQuery+testReadAPIConnectionMultiClose+testReadAPIIterationAndOrder, !com.google.cloud.bigquery.it.ITNightlyBigQueryTest#testIterateAndOrder+testMultipleRuns+testIterateAndOrderDefaultConnSettings, IT*, *ClientTest"
# Run Unit and Integration Tests with Native Image
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use the maven command used to run integration check(line 64) to run both graalVM checks too. Otherwise it will run the nightly checks as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mpeddada1 +1 We may want to avoid triggering ITNightly during GraalVM presubmits (it would otherwise slow it down)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! Modified the script to exclude nightly tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Neenu1995 @prash-mi to make sure that we're not losing test coverage, what is the process of adding these excluded tests as nightly jobs (with native image compilation)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same way the graalvm presubmbit checks are added, add the cfg files to the nightly folder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds great. I'll do this in a follow-up PR.

@prash-mi
Copy link
Contributor

ITBigqueryTest is resulting in the following issue:

Failures (1):
  JUnit Vintage:ITBigQueryTest:testBQResultSetPagination
    MethodSource [className = 'com.google.cloud.bigquery.it.ITBigQueryTest', methodName = 'testBQResultSetPagination', methodParameterTypes = '']
    => java.lang.NullPointerException
       com.google.cloud.bigquery.Schema.fromPb(Schema.java:96)
       com.google.cloud.bigquery.ConnectionImpl.getSubsequentQueryResultsWithJob(ConnectionImpl.java:685)
       com.google.cloud.bigquery.ConnectionImpl.queryRpc(ConnectionImpl.java:327)
       com.google.cloud.bigquery.ConnectionImpl.executeSelect(ConnectionImpl.java:195)
       com.google.cloud.bigquery.it.ITBigQueryTest.testBQResultSetPagination(ITBigQueryTest.java:2676)
       java.lang.reflect.Method.invoke(Method.java:566)
       org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
       org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
       org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
       org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
       [...]

#2106 should ideally address this issue.

@mpeddada1
Copy link
Contributor Author

#2106 should ideally address this issue.

Awesome! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/java-bigquery API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NoClassDefFoundError for Apache Arrow class when using JDK 17
4 participants