dongjoon-hyun opened a new pull request, #697:
URL: https://github.com/apache/spark-kubernetes-operator/pull/697
### What changes were proposed in this pull request?
Make `build_and_test.yml` a reusable (`workflow_call`) workflow and add
Apache
Spark's fork-based CI status mechanism:
- `build_main.yml` — runs on `push` to all branches and calls
`build_and_test.yml`;
it also carries the `cancel-in-progress` concurrency group (moved out of
`build_and_test.yml`, since the triggers now live here).
- `notify_test_workflow.yml` — on `pull_request_target`, creates a `Build`
check
on the PR that points to the fork's run.
- `update_build_status.yml` — every 15 minutes, syncs the `Build` check from
the
fork's run.
- Add `images/workflow-enable-button.png` used by the notify message, and
repoint
the README badge to `build_main.yml`.
Flow:
```mermaid
flowchart TD
subgraph fork["Forked repo (contributor)"]
P([push to any branch]) --> BM["build_main.yml — job: Run"]
BM -->|workflow_call| BAT["build_and_test.yml
(reusable):<br/>License Check, build/test matrix, K8s and Helm tests"]
BAT --> CR["check runs:<br/>Run / License Check, ..."]
end
subgraph up["Upstream repo (apache/spark-kubernetes-operator)"]
PRT([pull_request_target]) --> N["notify_test_workflow.yml"]
SCH([schedule: every 15 min]) --> U["update_build_status.yml"]
N -->|create| B(["Build check on PR"])
U -->|"PATCH status / conclusion"| B
end
BM -.->|"① find run (id: build_main.yml)"| N
CR -.->|"② link check-run view"| N
BM -.->|"③ poll run status"| U
```
### Why are the changes needed?
Like the Apache Spark main repository, run the heavy test matrix in
contributors'
forks and mirror only a single `Build` status check upstream, instead of
running
the matrix in the upstream repo on every PR. This matches the Apache Spark
main
repository and is especially valuable here, where the matrix spans multi-arch
build/test across JDK 21 / 25 / 26 plus dozens of Kubernetes integration and
Helm
jobs.
### Does this PR introduce _any_ user-facing change?
No. CI and documentation only.
### How was this patch tested?
Static verification of the cross-workflow wiring: `build_main.yml`'s `Run`
job and
`build_and_test.yml`'s `License Check` job produce the `Run / License Check`
check-run name that `notify_test_workflow.yml` probes for; the shared
`Build` check
name; and the `run_id` passed via the check output text from `notify` to
`update`.
All four workflow YAMLs parse cleanly. Full behavior takes effect only after
merge
to `main`, since the `pull_request_target` / `schedule` workflows and the
`main`-pinned image URL resolve from the default branch.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]