Build: Add Gradle dependency-submission workflow#16367
Open
kevinjqliu wants to merge 1 commit into
Open
Conversation
Adds a workflow that runs gradle/actions/dependency-submission against the full multi-project build (-DallModules) to populate GitHub's dependency graph and enable Dependabot alerts for transitive Gradle dependencies across all subprojects. Complements cve-scan.yml (Trivy on shipped jars) by surfacing the declared Gradle dependency graph across every known Spark/Flink/Kafka versioned module. Triggers / safety: - push: main only — GitHub only consumes the default branch's graph for Dependabot, and limiting writes here keeps 'contents: write' off fork PRs. - schedule: daily at 06:17 UTC so newly-disclosed CVEs surface on quiet days; off-peak minute to avoid the top-of-hour GHA scheduler stampede. - workflow_dispatch for manual reruns. - if: github.repository_owner == 'apache' (matches stale.yml, publish-snapshot.yml, recurring-jmh-benchmarks.yml) so the job no-ops on forks where the Submission API rejects writes. - timeout-minutes: 30 caps the daily cron so a stalled metadata download cannot tie up the runner / contents:write slot indefinitely. Graph scope: - additional-arguments: -DallModules expands all Spark/Flink/Kafka versioned subprojects in settings.gradle. - dependency-graph-exclude-configurations: skip *TestCompile/*TestRuntime classpaths so JUnit, AssertJ, Mockito, TestContainers, etc. don't generate Dependabot noise for non-shipped deps. - dependency-graph-exclude-projects: ':buildSrc' — pure build-time tooling, never ships. - dependency-graph: generate-and-submit — skip the redundant 30-day workflow-artifact upload (snapshot is already persisted via the API). Other: - cache-read-only: true — java-ci's build-checks remains the canonical cache writer. - persist-credentials: false on checkout. - concurrency without cancel-in-progress so cron runs are never killed by overlapping pushes. - All actions pinned to SHAs matching java-ci.yml.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow that submits Iceberg's full multi-project Gradle dependency graph to GitHub's Dependency Submission API, enabling native Dependabot CVE alerts for all transitive Maven coordinates across every Spark/Flink/Kafka subproject.
Changes:
- Adds
.github/workflows/dependency-submission.ymlrunning on push tomain, a daily cron, andworkflow_dispatch. - Uses
-DallModulesto resolve every versioned subproject, while excluding:buildSrcand test classpaths so only shipped dependencies surface. - Pins all actions to SHAs matching
java-ci.yml, usescache-read-only: true,persist-credentials: false, a 30‑minute timeout, and a fork-skip guard viagithub.repository_owner == 'apache'.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Runs
gradle/actions/dependency-submissionagainst the full multi-project build (-DallModules) to populate GitHub's dependency graph and enable Dependabot alerts for transitive Gradle deps across all subprojects. Complementscve-scan.yml(Trivy on shipped jars).Once merged, the resolved graph shows up at https://github.com/apache/iceberg/network/dependencies and lights up GitHub's native Dependabot CVE alerts for every transitive Maven coordinate the build pulls in.
Scope
-DallModulescovers every Spark/Flink/Kafka versioned subproject.:buildSrcand*Test{Compile,Runtime}Classpathso Dependabot only alerts on shipped deps.Safety
push: main+ daily cron (06:17 UTC) +workflow_dispatch. Nopull_request, socontents: writeis never granted to fork PRs.if: github.repository_owner == 'apache'no-ops on forks.timeout-minutes: 30,cache-read-only: true,persist-credentials: false, all actions pinned to SHAs matchingjava-ci.yml.Validation
Tested on my fork: 1,500 unique Maven artifacts resolved in ~1 min,
buildSrcand test-classpath entries correctly excluded (0 hits each).