Repository navigation
[ci] Document ci/ray_ci/doc and the doc pipeline's shared surfaces - #65391
Merged
dstrodtman merged 2 commits intoAug 14, 2026
Merged
Conversation
The package holds the doc-site build and the API-reference guards, but has no orientation for someone opening it: nine modules, three of which are entry points, and the wiring that decides which is which lives in three other files (.buildkite/doc.rayci.yml, .buildkite/lint.rayci.yml, ci/lint/lint.sh). Add a README describing what each entry point does and where it's invoked from, what the shared libraries contribute, and two things the layout actively misleads on: two of the three cmd_* modules have py_binary targets but don't run through bazel in CI, and the "doc: check API annotations" step is a different check that lives outside this package. Descriptive only; no behavior change. Signed-off-by: Douglas Strodtman <[email protected]>
Follow-on to the ci/ray_ci/doc README. Two descriptive additions and two removals, no behavior change. Orientation comments: - .buildkite/doc.rayci.yml gets a header listing the steps and what each one is for, and notes that tag rules, not this file, decide what runs on a PR. - .buildkite/test.rules.txt and always.rules.txt get a scope note. Both decide what CI runs for every pull request in the repo, so an edit is a repo-wide change; the note also records that rules are first-match-wins in file order, which makes rule position as load-bearing as rule content, and points at the in-repo checks to run. Removals: - ci/ray_ci/doc/test_update_cache_env.py imported ci.ray_ci.doc.cmd_update_cache_env, deleted in ray-project#47233 (Aug 2024). The test was added later, in ray-project#64277, and has never been able to import. It also has no py_test target, so nothing ran it and nothing reported that it was broken. - Dropped a stale cross-repo pointer from the api_param_coverage docstring. The paragraphs above it already describe the check's scope, so nothing is lost by removing a reference readers of this repo can't follow. Verified: bazel test //ci/pipeline:test_doc_api_rules_sync //ci/ray_ci/doc/... (7/7 pass); both rules files still parse under ci/pipeline/determine_tests_to_run.py with unchanged tag output. Signed-off-by: Douglas Strodtman <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request improves repository documentation by adding detailed explanatory comments to Buildkite configuration files (always.rules.txt, doc.rayci.yml, and test.rules.txt) and creating a comprehensive README.md for the ci/ray_ci/doc directory. Additionally, it cleans up obsolete comments in api_param_coverage.py and removes an unused test file. There are no review comments, so we have no feedback to provide.
elliot-barn
approved these changes
Aug 14, 2026
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
…ay-project#65391) ## Why this change `ci/ray_ci/doc/` holds the documentation site build and the API-reference guards, but there's no orientation for anyone opening it. Nine modules, three of which are entry points, and the wiring that decides which is which lives in three other files (`.buildkite/doc.rayci.yml`, `.buildkite/lint.rayci.yml`, `ci/lint/lint.sh`). Reading the directory alone gives you the wrong model of it. The same is true one level up: `doc.rayci.yml` opens straight at `group: doc` with no statement of what the pipeline does, and the two rules files that decide what CI runs for *every* PR in the repo don't say anywhere that that's what they do. This PR is descriptive only. No step, rule, tag, or target changes behavior. ## What's here **New `ci/ray_ci/doc/README.md`.** What each entry point does and where it's invoked from, what the shared libraries contribute, and two things the layout actively misleads on: - `cmd_check_api_discrepancy` and `cmd_check_api_param_coverage` have `py_binary` targets but don't run through Bazel in CI. `lint.sh` invokes them with the docbuild image's interpreter, because the Bazel targets resolve `@py_deps_py310` wheels that can't import under the py3.11 docbuild image. There's already a `TODO(elliot-barn)` on ray-project#64070 to undo this once hermetic py3.11 lands. - The `doc: check API annotations` step isn't this package at all — it runs `ci/lint/check_api_annotations.py`. Easy to assume otherwise, since it sits next to `doc: check API doc consistency`, which *is* this package. **Header comment on `.buildkite/doc.rayci.yml`** listing the steps in order and what each is for, and noting that tag rules, not this file, decide what runs on a given PR. **Scope notes on `.buildkite/test.rules.txt` and `always.rules.txt`.** Both decide what CI runs for every pull request in the repository, so an edit is a repo-wide change rather than a local one. The note also records that rules are first-match-wins in file order, which makes rule *position* as load-bearing as rule content, and points at the in-repo check to run. **Two removals.** - `ci/ray_ci/doc/test_update_cache_env.py` imports `ci.ray_ci.doc.cmd_update_cache_env`, which was deleted in ray-project#47233 (Aug 2024). The test was added later, in ray-project#64277, so it has never been able to import since the day it landed. It also has no `py_test` target, which is why nothing ran it and nothing reported it was broken. - A stale cross-repo pointer in the `api_param_coverage` module docstring, referencing a path outside this repository that readers here can't follow. The paragraphs above it already describe the check's scope, so nothing is lost. ## Not a duplicate Checked open PRs for the touched areas per `AGENTS.md`: ``` gh pr list --repo ray-project/ray --state open --search "ray_ci/doc README" gh pr list --repo ray-project/ray --state open --search "test_update_cache_env" gh pr list --repo ray-project/ray --state open --search "test.rules.txt header comment" ``` No open PR adds a README here, touches the dead test, or comments these files. Two PRs matched the third search on body text only (ray-project#65342, ray-project#64977); I confirmed against their file lists that neither touches `doc.rayci.yml`, `test.rules.txt`, or `always.rules.txt`. ray-project#65211 touches `ci/ray_ci/doc/api.py`, a different file in the same directory, and doesn't conflict. ## Testing ``` bazel test //ci/pipeline:test_doc_api_rules_sync //ci/ray_ci/doc/... ``` 7/7 pass (`test_doc_api_rules_sync`, `test_api`, `test_api_param_coverage`, `test_autodoc`, `test_build_cache`, `test_cmd_check_api_discrepancy`, `test_module`). Because the comments land on rule files, I also confirmed the rules still parse and emit identical tags, loading both files through `ci/pipeline/determine_tests_to_run.py` and comparing `match_tags` output before and after. Comments are ignored by the parser and nothing moved. `pre-commit run` passes on every changed file. ## AI assistance This change was written with AI assistance. I reviewed every line, ran the tests above myself, and can defend the change end-to-end. Every technical claim in the added comments was verified against the source rather than inferred: the invocation paths from `lint.sh` and the pipeline YAML, the first-match-wins ordering from `TagRuleSet.match_tags`, and the dead import from `git log` on the deleted module plus a direct import attempt. --------- Signed-off-by: Douglas Strodtman <[email protected]> Signed-off-by: 400Ping <[email protected]>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…ay-project#65391) ## Why this change `ci/ray_ci/doc/` holds the documentation site build and the API-reference guards, but there's no orientation for anyone opening it. Nine modules, three of which are entry points, and the wiring that decides which is which lives in three other files (`.buildkite/doc.rayci.yml`, `.buildkite/lint.rayci.yml`, `ci/lint/lint.sh`). Reading the directory alone gives you the wrong model of it. The same is true one level up: `doc.rayci.yml` opens straight at `group: doc` with no statement of what the pipeline does, and the two rules files that decide what CI runs for *every* PR in the repo don't say anywhere that that's what they do. This PR is descriptive only. No step, rule, tag, or target changes behavior. ## What's here **New `ci/ray_ci/doc/README.md`.** What each entry point does and where it's invoked from, what the shared libraries contribute, and two things the layout actively misleads on: - `cmd_check_api_discrepancy` and `cmd_check_api_param_coverage` have `py_binary` targets but don't run through Bazel in CI. `lint.sh` invokes them with the docbuild image's interpreter, because the Bazel targets resolve `@py_deps_py310` wheels that can't import under the py3.11 docbuild image. There's already a `TODO(elliot-barn)` on ray-project#64070 to undo this once hermetic py3.11 lands. - The `doc: check API annotations` step isn't this package at all — it runs `ci/lint/check_api_annotations.py`. Easy to assume otherwise, since it sits next to `doc: check API doc consistency`, which *is* this package. **Header comment on `.buildkite/doc.rayci.yml`** listing the steps in order and what each is for, and noting that tag rules, not this file, decide what runs on a given PR. **Scope notes on `.buildkite/test.rules.txt` and `always.rules.txt`.** Both decide what CI runs for every pull request in the repository, so an edit is a repo-wide change rather than a local one. The note also records that rules are first-match-wins in file order, which makes rule *position* as load-bearing as rule content, and points at the in-repo check to run. **Two removals.** - `ci/ray_ci/doc/test_update_cache_env.py` imports `ci.ray_ci.doc.cmd_update_cache_env`, which was deleted in ray-project#47233 (Aug 2024). The test was added later, in ray-project#64277, so it has never been able to import since the day it landed. It also has no `py_test` target, which is why nothing ran it and nothing reported it was broken. - A stale cross-repo pointer in the `api_param_coverage` module docstring, referencing a path outside this repository that readers here can't follow. The paragraphs above it already describe the check's scope, so nothing is lost. ## Not a duplicate Checked open PRs for the touched areas per `AGENTS.md`: ``` gh pr list --repo ray-project/ray --state open --search "ray_ci/doc README" gh pr list --repo ray-project/ray --state open --search "test_update_cache_env" gh pr list --repo ray-project/ray --state open --search "test.rules.txt header comment" ``` No open PR adds a README here, touches the dead test, or comments these files. Two PRs matched the third search on body text only (ray-project#65342, ray-project#64977); I confirmed against their file lists that neither touches `doc.rayci.yml`, `test.rules.txt`, or `always.rules.txt`. ray-project#65211 touches `ci/ray_ci/doc/api.py`, a different file in the same directory, and doesn't conflict. ## Testing ``` bazel test //ci/pipeline:test_doc_api_rules_sync //ci/ray_ci/doc/... ``` 7/7 pass (`test_doc_api_rules_sync`, `test_api`, `test_api_param_coverage`, `test_autodoc`, `test_build_cache`, `test_cmd_check_api_discrepancy`, `test_module`). Because the comments land on rule files, I also confirmed the rules still parse and emit identical tags, loading both files through `ci/pipeline/determine_tests_to_run.py` and comparing `match_tags` output before and after. Comments are ignored by the parser and nothing moved. `pre-commit run` passes on every changed file. ## AI assistance This change was written with AI assistance. I reviewed every line, ran the tests above myself, and can defend the change end-to-end. Every technical claim in the added comments was verified against the source rather than inferred: the invocation paths from `lint.sh` and the pipeline YAML, the first-match-wins ordering from `TagRuleSet.match_tags`, and the dead import from `git log` on the deleted module plus a direct import attempt. --------- Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman
added a commit
that referenced
this pull request
Nov 4, 2026
## Description This PR makes the `lint: API param coverage` step a required check by removing `soft_fail: true`. The step was added in #64788 on 2026-08-11. A comment in the step said to remove `soft_fail` "once the false-positive rate is confirmed low." This PR measures that rate from the step's CI history and fixes the four failure patterns the history turned up. While the step only warns, undocumented parameters still land on master. #65633, #66602, and #66950 all merged with the check failing. ### Warn-phase metrics These numbers come from every `premerge` build from 2026-08-11 to 2026-10-29, pulled from the Buildkite API. | | Runs | PRs | |---|--:|--:| | Completed runs of the step | 3,453 | | | Passed | 3,398 | | | Failed | 55 | 23 | | Canceled, which isn't a check outcome | 211 | | Each failure falls into one of three groups: | Failure type | PRs | Runs | Detail | |---|--:|--:|---| | Correct finding | 15 | 42 | A new parameter on a `@PublicAPI` callable has no `Args:` entry. Two of these PRs, #65823 and #65839, were stacked on #65633 before it merged and report its findings again. | | False positive | 3 | 4 | #64399 flagged the `v` argument of a pydantic `@field_validator`. #66255 flagged the private kwarg `_direct_http`. #67258 flagged an option of the `ray start` Click command, which `help=` documents. | | Infrastructure | 5 | 9 | The step printed `could not determine merge-base` and no findings. The branches of #65437 and #65809 forked 520 and 598 master commits before their builds. The step's `git fetch --depth=500` makes the full CI clone shallow, so their merge-base wasn't in the fetched history. | That's 13 spurious failures out of 3,453 runs, about 0.4%, or 13 of 55 failures. Each one would block a PR once the step is required, so this PR fixes all four patterns before removing `soft_fail`. ### Changes - **`_`-prefixed parameters:** `api_param_coverage.py` skips parameters whose names start with `_`. That's Ray's convention for private kwargs, such as `ray.put(_owner=...)`, `tune.run(_remote=...)`, and `Deployment.options(_internal=...)`. On master, 31 public callables have such parameters. - **Pydantic validators and Click commands:** The script skips callables decorated with `field_validator`, `model_validator`, `validator`, `root_validator`, `command`, or `group`. On master, this removes 59 callables from scope. All of them are Click commands, such as `ray start` and `ray job submit`, or pydantic validators on Serve config models. None of them is a Python API whose parameters a docstring documents. - **Property setters:** The script also skips callables decorated with `@<name>.setter`. A setter's `value` is documented on the property's getter, which is the docstring Sphinx renders, not in an `Args:` section of its own. - **Shallow-clone merge-base:** When `git merge-base` fails after the depth-500 fetch, `ci/lint/lint.sh` runs `git fetch --unshallow` and retries. A branch within 500 commits of the base never reaches that path. The Python check still fails closed if the base can't be resolved after that. - **Step definition:** `.buildkite/lint.rayci.yml` drops `soft_fail: true` and the warn-phase comment. The `--blocking` help text in `cmd_check_api_param_coverage.py` no longer describes a warn phase. ## Related issues Follow-up to #64788. ## Additional information ### Testing - `pytest ci/ray_ci/doc/test_api_param_coverage.py`: 40 passed. That's the 28 existing tests plus 12 new cases covering `_` params, each validator spelling, Click command forms, and property setters. The test comments name the real PR that motivated each one. - **Replay against real PRs:** I ran the master and patched versions of the check against the exact commit and base of every failing run in each of the 18 PRs with findings. Master reproduces all 18 failures. The patched check passes #64399, #66255, and #67258, and reports the same findings as master on the other 15. - **Merge-base fix:** In a local repo with 600 commits on `master` and a branch forked at commit 50, `git fetch --depth=500` followed by `git merge-base` fails, which reproduces the CI failure. With the new `lint.sh` block, it resolves the correct fork commit. A branch forked 10 commits back resolves without the fallback. - `pre-commit run` on the changed files passes, including ruff, black, shellcheck, and docstyle. ### Duplicate check `gh pr list --state open --search "param coverage"` and `--search "api_param_coverage"` return no open PR that touches this check. The script hasn't changed since #65391 on 2026-08-14. ### AI assistance I used Claude Code to pull and classify the Buildkite history, draft the changes, and run the replay. I reviewed every changed line and the classification of every failing PR. 🤖 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.
Why this change
ci/ray_ci/doc/holds the documentation site build and the API-reference guards, but there's no orientation for anyone opening it. Nine modules, three of which are entry points, and the wiring that decides which is which lives in three other files (.buildkite/doc.rayci.yml,.buildkite/lint.rayci.yml,ci/lint/lint.sh). Reading the directory alone gives you the wrong model of it.The same is true one level up:
doc.rayci.ymlopens straight atgroup: docwith no statement of what the pipeline does, and the two rules files that decide what CI runs for every PR in the repo don't say anywhere that that's what they do.This PR is descriptive only. No step, rule, tag, or target changes behavior.
What's here
New
ci/ray_ci/doc/README.md. What each entry point does and where it's invoked from, what the shared libraries contribute, and two things the layout actively misleads on:cmd_check_api_discrepancyandcmd_check_api_param_coveragehavepy_binarytargets but don't run through Bazel in CI.lint.shinvokes them with the docbuild image's interpreter, because the Bazel targets resolve@py_deps_py310wheels that can't import under the py3.11 docbuild image. There's already aTODO(elliot-barn)on [doc] Upgrade Sphinx to 8.2.3 on Python 3.11 (step 1 of 8->9) #64070 to undo this once hermetic py3.11 lands.doc: check API annotationsstep isn't this package at all — it runsci/lint/check_api_annotations.py. Easy to assume otherwise, since it sits next todoc: check API doc consistency, which is this package.Header comment on
.buildkite/doc.rayci.ymllisting the steps in order and what each is for, and noting that tag rules, not this file, decide what runs on a given PR.Scope notes on
.buildkite/test.rules.txtandalways.rules.txt. Both decide what CI runs for every pull request in the repository, so an edit is a repo-wide change rather than a local one. The note also records that rules are first-match-wins in file order, which makes rule position as load-bearing as rule content, and points at the in-repo check to run.Two removals.
ci/ray_ci/doc/test_update_cache_env.pyimportsci.ray_ci.doc.cmd_update_cache_env, which was deleted in [doc][build] Stop using Bazel and change commit trace logic #47233 (Aug 2024). The test was added later, in [doc] Build Read the Docs incrementally from the doc build cache #64277, so it has never been able to import since the day it landed. It also has nopy_testtarget, which is why nothing ran it and nothing reported it was broken.api_param_coveragemodule docstring, referencing a path outside this repository that readers here can't follow. The paragraphs above it already describe the check's scope, so nothing is lost.Not a duplicate
Checked open PRs for the touched areas per
AGENTS.md:No open PR adds a README here, touches the dead test, or comments these files. Two PRs matched the third search on body text only (#65342, #64977); I confirmed against their file lists that neither touches
doc.rayci.yml,test.rules.txt, oralways.rules.txt. #65211 touchesci/ray_ci/doc/api.py, a different file in the same directory, and doesn't conflict.Testing
7/7 pass (
test_doc_api_rules_sync,test_api,test_api_param_coverage,test_autodoc,test_build_cache,test_cmd_check_api_discrepancy,test_module).Because the comments land on rule files, I also confirmed the rules still parse and emit identical tags, loading both files through
ci/pipeline/determine_tests_to_run.pyand comparingmatch_tagsoutput before and after. Comments are ignored by the parser and nothing moved.pre-commit runpasses on every changed file.AI assistance
This change was written with AI assistance. I reviewed every line, ran the tests above myself, and can defend the change end-to-end. Every technical claim in the added comments was verified against the source rather than inferred: the invocation paths from
lint.shand the pipeline YAML, the first-match-wins ordering fromTagRuleSet.match_tags, and the dead import fromgit logon the deleted module plus a direct import attempt.