dongjoon-hyun opened a new pull request, #60481:
URL: https://github.com/apache/spark/pull/60481
### What changes were proposed in this pull request?
This PR aims to run the `sparkr` job in PRs only when SparkR or its Scala
backend changes, and to skip it in the commit builds of `apache/spark`.
- In PRs, the job runs only when the PR changes one of the following
directories, instead of whenever `./dev/is-changed.py -m sparkr` returns `true`.
- `R/` and `dev/spark-test-image/sparkr/`, the source files of the
`sparkr` module
- `core/src/main/scala/org/apache/spark/api/r/`,
`sql/core/src/main/scala/org/apache/spark/sql/api/r/`, and
`mllib/src/main/scala/org/apache/spark/ml/r/`, the Scala backend that only the
SparkR tests exercise
- In the commit builds of `apache/spark`, `build_main.yml` sets `sparkr` to
`false`.
The R linter in the `lint` job and the R documentation in the `docs` job are
unchanged.
### Why are the changes needed?
Since `dev/is-changed.py` follows module dependencies and the `sparkr`
module depends on `hive` and `mllib`, the job runs for almost every PR that
changes `core`, `catalyst`, `sql`, or root-level build files, although most of
them do not change SparkR.
The scheduled builds of `master` already run the same `sparkr` job of
`build_and_test.yml`.
- Every 3 days: `build_java21.yml`, `build_codegen_jdk.yml`,
`build_java25.yml`, `build_non_ansi.yml`, and `build_rockdb_as_ui_backend.yml`
- Weekly: `build_uds.yml`, and `build_sparkr_window.yml` on Windows
So in PRs, the job keeps pre-merge coverage for the changes of SparkR
itself, and the scheduled builds cover the other changes after merge.
### Does this PR introduce _any_ user-facing change?
No. This is a CI-only change.
### How was this patch tested?
Pass the CIs. This PR changes only workflow files, so its PR builder skips
the `sparkr` job.
In addition, I checked the new condition locally against the last 300
non-merge commits of `master`. The job ran for 230 commits before and runs for
1 commit after.
```bash
for c in $(git log --no-merges --format=%h -300 apache/master); do
GITHUB_SHA=$c GITHUB_PREV_SHA=$c~1 ./dev/is-changed.py -m sparkr
done | sort | uniq -c
```
```bash
for c in $(git log --no-merges --format=%h -300 apache/master); do
git diff --name-only $c~1 $c | grep -qE
'^(R|dev/spark-test-image/sparkr|core/src/main/scala/org/apache/spark/api/r|sql/core/src/main/scala/org/apache/spark/sql/api/r|mllib/src/main/scala/org/apache/spark/ml/r)/'
&& echo true || echo false
done | sort | uniq -c
```
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 5.5
--
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]