Repository navigation
Conversation
Prepares Java CI for a GitHub merge queue (apache#20471, apache#19612). The queue itself is enabled later through .asf.yaml. - New ci.yml owns the triggers (pull_request, merge_group, push, workflow_dispatch) and calls bot.yml and java_ci_engines.yml as reusable workflows. Its Required Checks job reports on every PR and queue run, and fails unless both called workflows succeed. - Only push keeps the path filter: a required check must report on every PR, and a selector job would add a second runner wait. - Concurrency moves to ci.yml. Pushes are keyed by SHA so queue merge bursts never replace a pending master run; only PR runs cancel. - Codecov steps skip merge_group runs, which would file coverage under master for commits that may never land. - validate_source.yml also reports on merge_group, and never cancels queue runs.
Second part of apache#20471, following apache/arrow-rs. Fork PRs to master run the Java CI suites on the fork's own runners when the contributor pushes; the upstream PR run skips them, and the merge queue runs them on ASF runners before merge. - ci.yml runs on every branch push. Upstream it skips pushes to branches other than master, release-* and branch-0.x, and skips both suites on fork PRs to master. Release-branch PRs keep upstream testing. Fork pushes cancel the older run of the same branch. - Required Checks accepts skipped suites only on a fork PR to master, and links the fork run from the job summary. - New fork_ci_status.yml, adapted from arrow-rs: posts the fork run's result on the PR as the informational CI (fork) check. - Node tests of the bridge script and of ci.yml's routing run in validate-pr-and-source. - .github/workflows/README.md gains "Pull requests from forks".
Third part of apache#20471. Fork runs cannot use apache/hudi's Codecov token and are not linked to the PR, so fork PRs lost the coverage comment during review. - New upload-coverage action replaces the 12 Codecov steps: in apache/hudi it uploads as before, on a fork it saves jacoco-report.xml as an artifact named by commit, job and flag. - New fork_coverage_bridge.yml polls every 15 minutes: it matches each open fork PR's head to the fork's finished CI run, downloads the artifacts with its own GITHUB_TOKEN and uploads them to Codecov for that PR and commit, then records a Coverage (fork) check so each run uploads once. - Artifacts are untrusted data: names, flags and sizes are validated, only the XML is extracted, and no fork code is checked out or run. Codecov's path mapping gets the PR head's file list from a tree-only fetch of apache/hudi. - Node tests of the selection and recording scripts run next to the fork_ci_status.yml tests.
This branch has not been deployed
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.
Describe the issue this Pull Request addresses
With fork CI, a fork PR's tests run on the fork, which cannot use apache/hudi's Codecov token and is not linked to the PR, so the Codecov comment disappears from fork PRs during review.
Part of #20471. Stacked on the fork CI PR (and #20473): review the top commit only.
Summary and Changelog
upload-coverageaction replaces the 12 Codecov steps. In apache/hudi it uploads exactly as before; on a fork it savesjacoco-report.xmlas an artifact named by commit, job and flag.fork_coverage_bridge.yml, every 15 minutes: matches each open fork PR's head commit to the fork's finished CI run, downloads its coverage artifacts with its ownGITHUB_TOKEN, uploads them to Codecov for that PR and commit under the same flags, and records aCoverage (fork)check so each run uploads once.Trust model and smaller changes
GITHUB_TOKENcan download another public repository's artifacts: probe run (302 with the token, 401 without).validate-pr-and-source.Impact
Fork PRs get the Codecov comment back, up to about 15 minutes after their fork run finishes. Nothing changes for runs in apache/hudi.
Risk Level
low. The upload path in apache/hudi is unchanged; the bridge only reads public artifacts and writes Codecov uploads and one check per run.
Documentation Update
.github/workflows/README.mdupdated.Contributor's checklist