Repository navigation
Conversation
|
/gemini review |
There was a problem hiding this comment.
📋 Review Summary
This PR adds a GitHub Actions workflow (beam_Vendor_Java_Dependency_Submission.yml) to resolve and submit the dependency graphs for Beam's vendored Java modules (vendor/*) via gradle/actions/dependency-submission@v5. There are a couple of critical issues in the Gradle invocation and gradle/actions inputs that will cause the workflow to fail at runtime, along with a local composite action reference that should be updated for zizmor compliance.
🔍 General Feedback
- Gradle Configuration Gating: In
settings.gradle.kts, allvendor/*subprojects are only included in the Gradle build when-PvendoredDependenciesOnlyis passed. Without this property, the:vendor:*project paths do not exist and Gradle fails with a project-not-found error. - Gradle Argument Quoting:
gradle/actionsparsesadditional-argumentsusing whitespace-splitting without shell quote stripping, which breaks quoted multi-token-Dorg.gradle.jvmargsvalues.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
|
/gemini review |
|
/gemini review |
There was a problem hiding this comment.
📋 Review Summary
This PR adds a GitHub Actions workflow (.github/workflows/beam_Vendor_Java_Dependency_Submission.yml) and documentation updates to resolve and submit Maven dependency graphs for Beam's vendored Java subprojects (:vendor:*) to GitHub's Dependency Graph API. The previous review feedback regarding GRADLE_OPTS heap sizing and argument quoting has been cleanly addressed, and the workflow adheres to Beam's CI and security conventions.
🔍 General Feedback
- Actions are pinned to full commit SHAs with least-privilege permissions (
permissions: {}at top-level,contents: readon PR validation, andcontents: writerestricted to non-PR runs onapache/beam). - Scoping dependency graph generation to
:vendor:.*andruntimeClasspathwithGRADLE_OPTS: -Xms2g -Xmx5gand-Dorg.gradle.vfs.watch=falseis well-configured and verified in CI.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
|
/gemini review |
There was a problem hiding this comment.
📋 Review Summary
This PR adds a GitHub Actions workflow (.github/workflows/beam_Vendor_Java_Dependency_Submission.yml) and documentation updates to resolve and submit Maven dependency graphs for Beam's vendored Java subprojects (:vendor:*) to GitHub's Dependency Graph API. Consolidating the PR validation and master submission steps into a single job on [self-hosted, ubuntu-24.04, small] eliminates duplication while preserving safe behavior across pull_request, push, and workflow_dispatch events.
🔍 General Feedback
- All external actions (
actions/checkout,actions/setup-java,gradle/actions/dependency-submission) are pinned to full commit SHAs withpersist-credentials: falseon checkout. - Using
dependency-graph: ${{ github.event_name == 'pull_request' && 'generate-and-upload' || 'generate-submit-and-upload' }}cleanly validates dependency graph generation on pull requests without submitting snapshots to the Dependency Submission API until merged tomaster.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
|
Assigning reviewers: R: @Abacn for label build. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
I'm not sure the value of this newly introduced workflow, at least it should only have schedule / workflow_dispatch trigger |
In terms of value, this workflow in theory would have caught the CVE that Cham is dealing with now potentially a few weeks before 2.78 release cut. I am trying to flush these CVEs out and fix them in follow-up PRs. Updated this to run only on a weekly schedule + workflow_dispatch so it never runs on PRs or unrelated settings.gradle.kts commits. |
|
Thanks for the context. Then I think this workflow actually won't help. The original issue was BeamModulePlugin's guava version was stale. After #41594 it's now managed by GCP-BOM and we're good for now The vendored guava (and grpc, calcite), however, undergoes a different release process decoupled with Beam. It updates infrequently (last time beam-vendor-guava release was 3 years ago). We're unlikely to take action even if this workflow report findings If we really want to keep vendored dependency version to be up-to-date, consider unvendor them. In the past guava experienced backward compatibility issues (#18309) but seems to be stable in recent years. We can start a discussion in dev list to unvendor guava |
Note: this PR was auto-generated by tooling. Before moving it out of draft, the author has done a full review of the PR, specifically evaluating it on the following criteria:
masterthat Dependabot is not already addressingIf you have concerns with the PR or with the underlying methodology used to generate this, please comment below - they will be addressed by the author not the tooling :)
Adds a GitHub Actions workflow (
.github/workflows/beam_Vendor_Java_Dependency_Submission.yml) usinggradle/actions/dependency-submissionto resolve and submit Maven dependency graphs for Beam's vendored Java subprojects (:vendor:*, currently:vendor:calcite-1_40_0,:vendor:grpc-1_69_0, and:vendor:guava-32_1_2-jre).Motivation
Beam's vendored Java artifacts (
beam-vendor-*) shade and relocate dependencies underorg.apache.beam.vendor.*(and:vendor:calcite-1_40_0stripsMETA-INF/maven/**), leaving both GitHub's static Dependency Graph and downstream JAR/container scanners unable to detect CVEs in shaded transitive libraries. ResolvingruntimeClasspathacross:vendor:.*at the Gradle layer enables GitHub Dependabot Alerts to track vulnerabilities in vendored artifacts without flooding the repository with unshaded module alerts.Workflow Behavior
schedule/workflow_dispatch): Runsdependency-graph: generate-submit-and-uploadscoped todependency-graph-include-projects: ':vendor:.*'anddependency-graph-include-configurations: 'runtimeClasspath'once weekly (Mondays 06:00 UTC) or via manualworkflow_dispatch, avoiding anypull_request/pushoverhead.