Repository navigation
[ci] Scope code lint off doc/source code and config, split out pre_commit - #66740
Merged
Merged
Conversation
…mmit doc/source/*.py, *.yaml, and *.yml no longer select the code-oriented lint matrix. .pre-commit-config.yaml excludes doc/source/ globally, so pre_commit and pydoclint never see these files, and no other lint check reads them. pre_commit moves out of the lint-small matrix into its own step with an extra pre_commit tag. .vale.ini, .vale/, and doc/redirects/*.yaml emit that tag, so they run pre_commit, whose whitespace hooks can fail on them, without the rest of the matrix. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request optimizes the Buildkite CI pipeline by separating the pre_commit lint step from the main lint matrix and refining the trigger rules for documentation and configuration files. Specifically, Python and YAML files under doc/source/ are exempted from the full lint matrix since they are already excluded globally by pre-commit, while configuration files (like Vale and redirects) now trigger only the pre_commit step instead of the entire lint suite. There are no review comments, so I have no feedback to provide.
elliot-barn
approved these changes
Oct 5, 2026
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…mmit (ray-project#66740) ## Description Narrows which pull requests run the code-oriented lint matrix in `.buildkite/lint.rayci.yml`. It doesn't change anything that runs on master or release branches, which bypass rule evaluation. **`doc/source/*.py`, `*.yaml`, and `*.yml` no longer emit `lint`.** `.pre-commit-config.yaml` excludes `doc/source/` globally, apart from data prose and BUILD files, so `pre_commit` and `pre-commit pydoclint` never see these files, even with `--all-files`. None of the other checks read them either: - `clang_format` and `copyright_format` read only C++. - `dashboard_format` reads only the dashboard client. - `bazel_buildifier` reads only BUILD and `.bzl` files. - `bazel_team`, `pytest_format`, and `test_coverage` query test targets under `python/`. Before this change, editing `doc/source/conf.py` ran all nine code checks, roughly 6 to 8 minutes of runner time each, and none of them could fail on it. `test.rules.txt` is unchanged, so these paths still emit `doc` and the library doc tags, and doctests and the doc build still run. **`pre_commit` now has its own step.** It moves out of the `lint-small` matrix into a `lint-pre-commit` step tagged `lint` and `pre_commit`. Its trailing-whitespace and end-of-file hooks do read `.vale.ini`, `.vale/`, and `doc/redirects/*.yaml`. Those paths now emit `always pre_commit`, so they run `pre_commit` without the other seven checks. Anything that emits `lint` still selects the step, so code PRs are unaffected. This also corrects the comment in `always.rules.txt` and the expectation in `always.rules.test.txt` that both said `pre_commit` lints `doc/source/*.py`. ## Related issues None. I searched open PRs that touch `always.rules.txt` or the lint tags and found nothing in flight. The most recent related change is ray-project#65431, which scoped `doc_readme` the same way. ## Additional information **Verification** - `rayci test-rules` at the pinned `.rayciversion` (0.48.0): all expectations pass. As a negative control, I reverted one new expectation and confirmed it fails. - I ran `pre-commit run trailing-whitespace --files …` on each path to confirm pre-commit's file scope. `doc/source/conf.py`, `doc/source/cluster/kubernetes/configs/loki.log.yaml`, and `doc/source/data/examples.yml` report "Skipped". `.vale.ini`, `.vale/styles/Google/AMPM.yml`, and `doc/redirects/current.yaml` are checked. - I ran a tag dry-run on single-file diffs. The lint steps each one selects: | Changed file | Emitted tags | Lint steps selected | |---|---|---| | `doc/source/conf.py` | `always doc doc_api` | `always`-tagged steps only | | `.vale.ini` | `always doc pre_commit` | `always` steps + `lint: pre_commit` | | `doc/redirects/current.yaml` | `always doc_redirects pre_commit` | `always` steps + `lint: pre_commit` | | `python/ray/actor.py` | `always lint …` | Full matrix, unchanged | | `doc/source/index.md` | `always` | `always` steps only, unchanged | This draft PR is the confirming check that the emitted pipeline matches the table. **Out of scope:** notebooks under `doc/source/` are hidden by the same pre-commit exclude, but they stay on the catch-all for now. If that exclude ever narrows to cover `doc/source/*.py`, the new rule should be removed. The comment in `always.rules.txt` says so. AI assistance (Claude Code) was used to investigate and draft this change. I reviewed every changed line. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Description
Narrows which pull requests run the code-oriented lint matrix in
.buildkite/lint.rayci.yml. It doesn't change anything that runs on master or release branches, which bypass rule evaluation.doc/source/*.py,*.yaml, and*.ymlno longer emitlint..pre-commit-config.yamlexcludesdoc/source/globally, apart from data prose and BUILD files, sopre_commitandpre-commit pydoclintnever see these files, even with--all-files. None of the other checks read them either:clang_formatandcopyright_formatread only C++.dashboard_formatreads only the dashboard client.bazel_buildifierreads only BUILD and.bzlfiles.bazel_team,pytest_format, andtest_coveragequery test targets underpython/.Before this change, editing
doc/source/conf.pyran all nine code checks, roughly 6 to 8 minutes of runner time each, and none of them could fail on it.test.rules.txtis unchanged, so these paths still emitdocand the library doc tags, and doctests and the doc build still run.pre_commitnow has its own step. It moves out of thelint-smallmatrix into alint-pre-commitstep taggedlintandpre_commit. Its trailing-whitespace and end-of-file hooks do read.vale.ini,.vale/, anddoc/redirects/*.yaml. Those paths now emitalways pre_commit, so they runpre_commitwithout the other seven checks. Anything that emitslintstill selects the step, so code PRs are unaffected.This also corrects the comment in
always.rules.txtand the expectation inalways.rules.test.txtthat both saidpre_commitlintsdoc/source/*.py.Related issues
None. I searched open PRs that touch
always.rules.txtor the lint tags and found nothing in flight. The most recent related change is #65431, which scopeddoc_readmethe same way.Additional information
Verification
rayci test-rulesat the pinned.rayciversion(0.48.0): all expectations pass. As a negative control, I reverted one new expectation and confirmed it fails.pre-commit run trailing-whitespace --files …on each path to confirm pre-commit's file scope.doc/source/conf.py,doc/source/cluster/kubernetes/configs/loki.log.yaml, anddoc/source/data/examples.ymlreport "Skipped"..vale.ini,.vale/styles/Google/AMPM.yml, anddoc/redirects/current.yamlare checked.doc/source/conf.pyalways doc doc_apialways-tagged steps only.vale.inialways doc pre_commitalwayssteps +lint: pre_commitdoc/redirects/current.yamlalways doc_redirects pre_commitalwayssteps +lint: pre_commitpython/ray/actor.pyalways lint …doc/source/index.mdalwaysalwayssteps only, unchangedThis draft PR is the confirming check that the emitted pipeline matches the table.
Out of scope: notebooks under
doc/source/are hidden by the same pre-commit exclude, but they stay on the catch-all for now. If that exclude ever narrows to coverdoc/source/*.py, the new rule should be removed. The comment inalways.rules.txtsays so.AI assistance (Claude Code) was used to investigate and draft this change. I reviewed every changed line.
🤖 Generated with Claude Code