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

feat: java support for sdk17 #1952

Merged
merged 20 commits into from
Jan 30, 2025
Merged

feat: java support for sdk17 #1952

merged 20 commits into from
Jan 30, 2025

Conversation

davidgamez
Copy link
Member

@davidgamez davidgamez commented Jan 29, 2025

Summary:

This PR upgrades Java from 11 to 17. We already used Java 17, but it was inconsistent across all actions, deployments, and artifacts.
The com.github.sherter.google-java-format gradle plugin was also a blocker for upgrade, this is why it was replaced by the Spotless plugin, a more active project than the previous.
To facilitate the Java libraries upgrade, this PR introduces a default gradle centralized catalog. I added only the required libraries concerning the present PR; the complete alignment of dependencies will be part of #1725.

Part of #1725
Closes #1741

From our AI friend

This pull request includes multiple updates to the GitHub workflows, Dockerfile, and Gradle build files. The primary focus is upgrading the Java version and improving the formatting and validation processes.

Java Version Upgrade:

  • Updated Java version from 11 to 17 and changed the distribution from 'temurin' to 'zulu' across various GitHub workflow files (.github/workflows/acceptance_test.yml, .github/workflows/docker.yml, .github/workflows/end_to_end.yml, .github/workflows/formatting.yml, .github/workflows/package_installers.yml, .github/workflows/publish_assets.yml, .github/workflows/stg_web_client_merge.yml, .github/workflows/stg_web_svc_merge.yml, .github/workflows/test_pack_doc.yml, .github/workflows/web_client_pr.yml, .github/workflows/web_release.yml, .github/workflows/web_svc_pr.yml). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]

Dockerfile Updates:

  • Updated the base image in Dockerfile from gradle:7-jdk11-alpine to gradle:7-jdk17-alpine and from openjdk:11-slim to openjdk:17-slim. [1] [2]

Gradle Build File Updates:

  • Replaced the com.github.johnrengelman.shadow plugin version with an alias in app/gui/build.gradle and cli/build.gradle. [1] [2]

Formatting and Validation Improvements:

  • Replaced the gradle/gradle-build-action with a Spotless check in .github/workflows/formatting.yml and added steps to upload Spotless output and comment on PR if the code does not comply with the Google Java style guide.

Minor Code Cleanups:

  • Various minor cleanups and formatting fixes in Java source files (cli/src/main/java/org/mobilitydata/gtfsvalidator/cli/Arguments.java, core/src/main/java/org/mobilitydata/gtfsvalidator/model/ValidationReport.java, core/src/main/java/org/mobilitydata/gtfsvalidator/performance/MemoryUsageRegister.java, core/src/main/java/org/mobilitydata/gtfsvalidator/table/CsvFileLoader.java, core/src/main/java/org/mobilitydata/gtfsvalidator/table/TableLoader.java). [1] [2] [3] [4] [5] [6]
    Expected behavior:

Explain and/or show screenshots for how you expect the pull request to work in your testing (in case other devices exhibit different behavior).

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with gradle test to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@MobilityData MobilityData deleted a comment from github-actions bot Jan 29, 2025
@MobilityData MobilityData deleted a comment from github-actions bot Jan 29, 2025
Copy link
Contributor

🚨 Code Formatting Issue 🚨

This contribution does not follow the conventions set by the Google Java Style Guide.

Please run the following command at the root of the project to fix formatting errors:

./gradlew spotlessApply
🗂️ Affected files - `src/main/java/org/mobilitydata/gtfsvalidator/cli/Arguments.java`

Go to the Actions Dashboard to download the full Spotless output

@davidgamez davidgamez changed the title fix: java format support for sdk17 fix: java support for sdk17 Jan 30, 2025
@MobilityData MobilityData deleted a comment from github-actions bot Jan 30, 2025
@MobilityData MobilityData deleted a comment from github-actions bot Jan 30, 2025
@davidgamez davidgamez marked this pull request as ready for review January 30, 2025 21:03
@davidgamez
Copy link
Member Author

🚨 Code Formatting Issue 🚨

This contribution does not follow the conventions set by the Google Java Style Guide.

Please run the following command at the root of the project to fix formatting errors:

./gradlew spotlessApply

🗂️ Affected files
Go to the Actions Dashboard to download the full Spotless output

This PR introduced this new layout to the code formatting violation comment

Copy link
Contributor

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit 666d788
Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (0 out of 1801 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Errors (0 out of 1801 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1801 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1801 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

0 out of 1801 sources (~0 %) are corrupted.

⏱️ Performance Assessment

📈 Validation Time

Assess the performance in terms of seconds taken for the validation process.

Time Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 3.65 3.71 ⬆️+0.06
Median -- 1.33 1.37 ⬆️+0.04
Standard Deviation -- 10.42 10.36 ⬇️-0.06
Minimum in References Reports us-california-taft-area-transit-gtfs-2236 0.47 0.51 ⬆️+0.04
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 280.21 276.13 ⬇️-4.08
Minimum in Latest Reports us-california-flex-v2-developer-test-feed-1-gtfs-1817 0.54 0.49 ⬇️-0.05
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 280.21 276.13 ⬇️-4.08
📜 Memory Consumption
Metric Dataset ID Reference (s) Latest (s) Difference (s)
Average -- 466.49 MiB 464.66 MiB ⬇️-1.83 MiB
Median -- 331.92 MiB 331.92 MiB ⬆️+32 bytes
Standard Deviation -- 766.25 MiB 769.83 MiB ⬆️+3.57 MiB
Minimum in References Reports ro-vrancea-consiliul-judetean-vrancea-gtfs-1984 38.22 MiB 69.15 MiB ⬆️+30.93 MiB
Maximum in Reference Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.78 GiB 10.51 GiB ⬇️-276.34 MiB
Minimum in Latest Reports us-texas-denton-county-transportation-authority-dcta-gtfs-151 39.77 MiB 39.80 MiB ⬆️+39.67 KiB
Maximum in Latest Reports gb-unknown-uk-aggregate-feed-gtfs-2014 10.78 GiB 10.51 GiB ⬇️-276.34 MiB

@davidgamez davidgamez changed the title fix: java support for sdk17 feat: java support for sdk17 Jan 30, 2025
Copy link
Collaborator

@bdferris-v2 bdferris-v2 left a comment

Choose a reason for hiding this comment

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

LGTM regarding the question of Google + upgrading to Java 17

@davidgamez davidgamez merged commit e84a9aa into master Jan 30, 2025
144 of 145 checks passed
@davidgamez davidgamez deleted the fix/google-java-format-plugin branch January 30, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review GCP cloud runtimes
2 participants