nchammas opened a new pull request, #60780: URL: https://github.com/apache/spark/pull/60780
### What changes were proposed in this pull request? Added a `lint-r` module to `sparktestsupport` with `dev/lint-r` as its shell script test goal, and the lint job now runs it with `./dev/run-tests --modules lint-r`. This is the same approach #60449 took for JavaScript. The module is selected when anything under `R/`, the R lint scripts, or the lint CI image changes. Two supporting changes: - `dev/lint-r` now installs SparkR itself when `R/lib` doesn't have it, so the separate `./R/install-dev.sh` workflow step is gone. The install runs only when the linter does. - I removed `run_sparkr_style_checks()` from `dev/run-tests.py`. The `lint-r` goal replaces it, so a full `./dev/run-tests` has one R lint path. ### Why are the changes needed? The `lint` job installs SparkR and runs `dev/lint-r` on every PR, though almost no PRs touch R now that SparkR is deprecated. With this change those PRs skip both steps. The R linter (including SparkR install) takes a bit over 2 minutes to run. This is runner time we will now save on every single CI run. ### Does this PR introduce _any_ user-facing change? No, not for end users. For contributors, a full local `./dev/run-tests` now fails if R isn't on `PATH`. It used to skip the R style check in that case. This is the same trade-off #60449 accepted for npm. `SKIP_R` only skips the SparkR tests, not this linter, so there is no way to skip just `lint-r` short of `--modules`. SparkR test jobs are unchanged. ### How was this patch tested? R isn't installed on my machine, so I didn't run lintr or `R/install-dev.sh`. This PR changes `dev/lint-r`, so its own CI run is what exercises the new step. - Added a `sparktestsupport` test that checks a few representative paths select `lint-r` (or don't), and that `root` still runs `dev/lint-r`. `python3 -m unittest discover -s dev/sparktestsupport/tests -t dev` passes. - Checked with a stub `Rscript` that `dev/lint-r` calls `R/install-dev.sh` only when `R/lib/SparkR/DESCRIPTION` is missing. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Cursor (Grok 4.7, 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]
