-
Notifications
You must be signed in to change notification settings - Fork 54
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
chore: Update ci.yaml to setup Java 21 CI tests #2299
Conversation
build (21) failed at Integration tests step in commit 7a314dc . |
After enabling the tests verbosity, I find that the tests have actually failed (not a timeout or too big size failure).
|
reproduced the error locally, this is the test.log output for one of the tests -
Looks like (Google's) com.google.testing.junit.runner.junit4.JUnit4Runner does not seem to work in Java 21. |
Got the error -
Possible root cause - Gradle 8 introduced the archiveClassifier property as a replacement for classifier. It serves the same purpose of customizing the name and location of the JAR file. Looks like we need to modify our jar generation tasks configuration to use archiveClassifier instead of classifier. |
@@ -1,5 +1,5 @@ | |||
distributionBase=GRADLE_USER_HOME | |||
distributionPath=wrapper/dists | |||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip | |||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this because Gradle 8.4 is the minimum version that supports Java 21?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.github/workflows/ci.yaml
Outdated
@@ -28,7 +28,7 @@ jobs: | |||
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip | |||
- name: Integration Tests | |||
run: | | |||
bazelisk --batch test //test/integration/... | |||
bazelisk --batch test //test/integration/... --test_verbose_timeout_warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you still need this? If yes, would you add source code comment about the significance for Java 21?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this. removed it.
.github/workflows/ci.yaml
Outdated
@@ -28,7 +28,7 @@ jobs: | |||
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip | |||
- name: Integration Tests | |||
run: | | |||
bazelisk --batch test //test/integration/... | |||
bazelisk --batch test //test/integration/... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary space ad the end. Same for Line 126.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git diff origin/main
is your friend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All done.
Quality Gate passed for 'java_showcase_integration_tests'Kudos, no new issues were introduced! 0 New issues |
In the release note of next release of this repository, would you (manually) add a comment about the Gradle version change? |
@@ -17,12 +17,12 @@ dependencies { | |||
} | |||
|
|||
task javadocJar(type: Jar) { | |||
classifier = 'javadoc' | |||
archiveClassifier = 'javadoc' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the minimum Gradle version that supports archiveClassifier
? This file is used by self-service client libraries, if a customer is using an very old version of Gradle, I guess it would not work anymore for them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried 8.1 but didn't work. As suggested, I have separated out build (21) job and excluded the self service clients steps in it. Does that work?
@@ -48,7 +48,28 @@ jobs: | |||
pushd /tmp/java-compute/google-cloud-compute-small-v1-java | |||
./gradlew clean build publishToMavenLocal sourcesJar allJars | |||
popd | |||
|
|||
build-java-21: | |||
name: "build(21) except self-service clients" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you add source code comment why build (21) is special?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Quality Gate passed for 'gapic-generator-java-root'Kudos, no new issues were introduced! 0 New issues |
Quality Gate passed for 'gapic-generator-java-root'Kudos, no new issues were introduced! 0 New issues |
Quality Gate passed for 'java_showcase_integration_tests'Kudos, no new issues were introduced! 0 New issues |
This PR aims to setup Java 21 build for the repository.