Skip to content

chore: add jdk 8 verification to showcase CI #3735

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

mpeddada1
Copy link
Contributor

@mpeddada1 mpeddada1 commented Apr 8, 2025

This PR adds showcase testing for JDK 8.

Error:    bad class file: /home/runner/.m2/repository/ch/qos/logback/logback-classic/1.5.16/logback-classic-1.5.16.jar(ch/qos/logback/classic/Level.class)
Error:      class file has wrong version 55.0, should be 52.0

According to https://logback.qos.ch/dependencies.html 1.5.x targets at least JDK 11.

@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Apr 8, 2025
@mpeddada1
Copy link
Contributor Author

Adding 8 to the matrix results in:

Failed to execute goal com.spotify.fmt:fmt-maven-plugin:2.25:check (default) on project api-common: Execution default of goal com.spotify.fmt:fmt-maven-plugin:2.25:check failed: Unable to load the mojo 'check' in the plugin 'com.spotify.fmt:fmt-maven-plugin:2.25' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com/spotify/fmt/Check has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: xs Pull request size is extra small. labels Apr 11, 2025
@mpeddada1 mpeddada1 requested a review from blakeli0 April 11, 2025 19:21
@mpeddada1 mpeddada1 marked this pull request as ready for review April 11, 2025 19:22
java-version: 8
distribution: temurin
- run: java -version
- name: Showcase golden tests
Copy link
Collaborator

Choose a reason for hiding this comment

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

The golden tests verify the static generation results, which would not change with Java 8.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah that's a good point, thank you

- name: Parse showcase version
working-directory: java-showcase/gapic-showcase
run: echo "SHOWCASE_VERSION=$(mvn help:evaluate -Dexpression=gapic-showcase.version -q -DforceStdout)" >> "$GITHUB_ENV"
- name: Install showcase server
Copy link
Collaborator

Choose a reason for hiding this comment

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

Downloading showcase server should ideally only happen once, but I guess that may require this to be merged with the regular showcase tests. Is there a way for two CI jobs to share the same set up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm true, from looking at the logs, I think this step gets repeated even when we have a matrix. Haven't tried this out yet but we could have a separate job that does the download once and caches the showcase path. All the other showcase jobs would be dependent on this job. wdyt?

However, this may lead to the "download" job showing on the CI.

Copy link

Copy link

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

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.

2 participants