Repository navigation
ci: remove redundant setup-java and Maven 3.8.2 downgrade from unmanaged-dependency-check - #15445
Merged
Merged
Conversation
…ged-dependency-check Remove actions/setup-java@v3 and stCarolas/setup-maven@v4.5 (Maven 3.8.2) from unmanaged-dependency-check/action.yaml so the action uses the caller's JDK, Maven settings.xml, and preinstalled Maven 3.10.x instead of downgrading after Maven 3.10.x has already hard-linked installed POMs into ~/.m2/repository. Also pass inputs.bom-path via an environment variable and print captured Maven output on failure with -e.
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the GitHub Action for checking unmanaged dependencies by removing the explicit Java and Maven setup steps, using the GITHUB_ACTION_PATH environment variable, and passing the BOM path input via an environment variable. It also adds error handling to the Maven execution step. Feedback on the changes suggests using printf instead of echo to print the output of the dependency check to prevent potential issues with leading hyphens.
| echo "Running Unmanaged Dependency Check against ${bom_absolute_path}" | ||
| unmanaged_dependencies=$(mvn exec:java -Dexec.args="../pom.xml ${bom_absolute_path}" -q) | ||
| if ! unmanaged_dependencies=$(mvn exec:java -Dexec.args="../pom.xml ${bom_absolute_path}" -q -e); then | ||
| echo "${unmanaged_dependencies}" |
Contributor
There was a problem hiding this comment.
lqiu96
enabled auto-merge (squash)
December 4, 2026 18:35
jinseopkim0
approved these changes
Dec 4, 2026
lqiu96
added a commit
that referenced
this pull request
Dec 4, 2026
…3.0) across workflows (#15447) Standardizes `actions/checkout` and `actions/setup-java` versions across GitHub Actions workflows and `java-cloud-bom/tests/validate-bom/action.yml`. ### Changes - Updates 104 `actions/checkout` references (previously split across `v3.6.0` through `v6.1.0`) to `3d3c42e5aac5ba805825da76410c181273ba90b1` (`v7.0.1`). - Updates 100 `actions/setup-java` references (previously split across `v3.14.1` through `v5.7.0`) to `d1374f8ac74474200d16ef8ecee22c7ae7a51880` (`v6.3.0`). - Excludes `librarian_generation_check.yaml`, `update_librarian_googleapis.yaml`, the 7 Spanner CI workflows, and `sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check/action.yaml` (updated separately in #15445). ### Why - Removes deprecated action versions and runtimes: `actions/checkout@v3.6.0` and `actions/setup-java@v3.14.1` target deprecated Node 16 (`setup-java@v3` is EOL and logs deprecation warnings on every run), and `actions/checkout@v4.x` / `actions/setup-java@v4.x` target Node 20 (which GitHub Actions runners warn is deprecated and force onto Node 24). Both `v7.0.1` and `v6.3.0` run natively on Node 24. - Unifies Maven cache keys: `setup-java@v3` (`setup-java-Linux-maven-<hash>`) and `v4`/`v5` (`setup-java-Linux-x64-maven-<hash>`) produced separate cache entries under the 10 GB repository cache cap, causing avoidable cache misses and evictions across workflows. - Picks up `actions/setup-java` v6.x improvements relevant to this repo: - Caches resolved JDK releases to avoid repeated vendor API lookups on floating versions (`11`, `17`, `21`, `25`, `26`) and supports Temurin 4-segment patch versions (such as `26.0.2.1+1`). - Preserves `~/.m2/toolchains.xml` across repeated `setup-java` steps in the same job (used by the Java 8 jobs that install both JDK 8 and JDK 11/17). - Migrates `distribution: zulu` workflows from the legacy Zulu Discovery API to the Azul Metadata API. - Makes the Java problem matcher opt-in by default (`v6.3.0`), avoiding truncated inline compiler warning annotations on PR diffs while keeping full diagnostics in build logs. - Supports configuring Maven mirrors and repositories directly in generated `settings.xml` (`v6.0.0`–`v6.2.0`), which future follow-ups can use for the GCS Maven Central mirror instead of copying `settings.xml` manually in scripts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove actions/setup-java@v3 and stCarolas/setup-maven@v4.5 (Maven 3.8.2) from unmanaged-dependency-check/action.yaml so the action uses the caller's JDK, Maven settings.xml, and preinstalled Maven 3.10.x instead of downgrading after Maven 3.10.x has already hard-linked installed POMs into ~/.m2/repository. Also pass inputs.bom-path via an environment variable and print captured Maven output on failure with -e.
Try to resolve this CI failure: https://github.com/googleapis/google-cloud-java/actions/runs/46971080890/job/144626791721?pr=15150
Job looks to pass after this change: https://github.com/googleapis/google-cloud-java/actions/runs/47391343513/job/145245991347?pr=15445