You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/contributor-guide/development.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -660,6 +660,52 @@ make # Build everything and update generated docs
660
660
make test # Run tests (optional but recommended)
661
661
```
662
662
663
+
## Forked-Branch CI
664
+
665
+
Comet runs PR CI on the contributor's fork rather than on `apache/datafusion-comet`. The heavy build/test matrix consumes the fork owner's GitHub Actions minutes and runners; the upstream repo only hosts a thin `Build` check that links to the fork's run. The design mirrors Apache Spark's fork-CI bridge.
666
+
667
+
### Flow
668
+
669
+
```mermaid
670
+
flowchart TD
671
+
subgraph fork["Forked repo (contributor)"]
672
+
P([push to any branch]) --> BM["build_main.yml — job: Run"]
SCH([schedule: every 15 min]) --> U["update_build_status.yml"]
680
+
N -->|create| B(["Build check on PR"])
681
+
U -->|"PATCH status / conclusion"| B
682
+
end
683
+
684
+
BM -.->|"① find run (id: build_main.yml)"| N
685
+
CR -.->|"② link check-run view"| N
686
+
BM -.->|"③ poll run status"| U
687
+
```
688
+
689
+
### Workflow responsibilities
690
+
691
+
- **`build_main.yml`** (fork) — triggers on `push` to any branch and calls `build_and_test.yml`. Contributor pushes to their fork run here, on the fork's runners.
692
+
- **`build_and_test.yml`** (fork, reusable) — invokes `ci.yml` with `force_all: true`, so the full per-Spark-version matrix runs even when changed paths don't match `ci.yml`'s filters (e.g. when iterating on the workflow files themselves).
693
+
- **`notify_test_workflow.yml`** (upstream) — runs on `pull_request_target` for opened/reopened/synchronize. Looks up the matching `build_main.yml` run on the PR head's fork+branch, then creates a `Build` check on the PR pointing at the fork's check-run view (`Run / CI / Preflight`). If the run can't be found, it reports `action_required` with instructions for the contributor to enable GitHub Actions on their fork.
694
+
- **`update_build_status.yml`** (upstream) — runs on a 15-minute cron, walks open PRs, and `PATCH`es each `Build` check's status/conclusion from the corresponding fork run. This is what eventually flips the upstream check from "queued" to "success/failure".
695
+
696
+
### Contributor checklist
697
+
698
+
If the upstream `Build` check fails with **"Workflow run detection failed"**:
699
+
700
+
1. Ensure GitHub Actions is enabled on your fork (Settings → Actions → "Allow all actions").
701
+
2. Rebase onto the latest upstream `main` and force-push — `notify_test_workflow.yml` looks up the run by `(fork owner, fork repo, branch, head sha)`, and a stale base can prevent the match:
702
+
```sh
703
+
git fetch upstream
704
+
git rebase upstream/main
705
+
git push origin <branch> --force
706
+
```
707
+
3. If the fork's run is healthy but the upstream check stays "queued" longer than ~15 minutes, the cron job in `update_build_status.yml` may have skipped a cycle — pushing a follow-up commit re-triggers `notify_test_workflow.yml` immediately.
0 commit comments