Skip to content

Conversation

@mpeddada1
Copy link
Contributor

@mpeddada1 mpeddada1 commented Feb 12, 2024

For java-spanner, java-pubsub dependencies dw check:

  • Use sdk-platform-java-config.
  • Since we are verifying changes in java-shared-config, explicitly set shared-dependencies in sdk-platform-java-config to currently released version to ensure that we're not testing any SNAPSHOT changes from sdk-platform-java.

Additional fix to address Graalvm downstream check failure:

The downstream GraalVM checks have been failing with:

Exception in thread "main" java.lang.NoSuchMethodError: org.junit.platform.engine.TestDescriptor.getAncestors()
Step #2: 	at org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.getTestClassNames(StackTracePruningEngineExecutionListener.java:50)
Step #2: 	at org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.executionFinished(StackTracePruningEngineExecutionListener.java:39)
Step #2: 	at org.junit.platform.launcher.core.DelegatingEngineExecutionListener.executionFinished(DelegatingEngineExecutionListener.java:46)
Step #2: 	at org.junit.platform.launcher.core.OutcomeDelayingEngineExecutionListener.reportEngineFailure(OutcomeDelayingEngineExecutionListener.java:83)
Step #2: 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:203)
Step #2: 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169)
Step #2: 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93)
Step #2: 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58)
Step #2: 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141)
Step #2: 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57)
Step #2: 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103)
Step #2: 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:94)
Step #2: 	at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:52)
Step #2: 	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:70)
Step #2: 	at org.graalvm.junit.platform.NativeImageJUnitLauncher.execute(NativeImageJUnitLauncher.java:74)
Step #2: 	at org.graalvm.junit.platform.NativeImageJUnitLauncher.main(NativeImageJUnitLauncher.java:129)

This error occurs starting with native-maven-plugin:0.9.24 which introduced some changes to be compatible with junit:5.10.0 (graalvm/native-build-tools#472).

This PR updates the junit-vintage-engine to the latest version.

@mpeddada1 mpeddada1 requested a review from a team as a code owner February 12, 2024 21:36
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Feb 12, 2024
@mpeddada1 mpeddada1 changed the title chore: use sdk-platform-java-config in downstream checks for spanner and pubsub chore: use sdk-platform-java-config in downstream checks for spanner and pubsub; update junit-vintage to 5.10.2 Feb 13, 2024
setns x=http://maven.apache.org/POM/4.0.0
cd .//x:artifactId[text()="google-cloud-shared-config"]
cd ../x:version
set ${JAVA_SHARED_CONFIG_VERSION}
Copy link
Member

Choose a reason for hiding this comment

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

nit: from a generic, function design standpoint... using parameters should be preferred over using global state, as it makes the contract of the function when seeing it in use explicit rather than implicit.

In other words:

replace_java_shared_config_version pom.xml 2.3.4 # I can read this an know exactly what is happening.

vs

replace_java_shared_config_version # I don't know what this affects w/o going to read the function

See also "pure functions" and their many benefits.

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, I've refactored this to accept args instead of using global variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants