Repository navigation
[ci] Scope docs-only deplock changes off the wheel/image build matrix - #65934
Conversation
A docs-only dependency change (doc/requirements-doc.txt plus the regenerated python/deplocks/docs/*.lock) triggered the full wheel and image build matrix, because the docs-deplock rule emitted python_dependencies -- the tag nearly every wheel/image step carries. But the docs deplock feeds only the Sphinx docbuild image; it is never installed into a Ray wheel or image, so that fan-out cannot affect any shipped artifact. python_dependencies does double duty: besides the wheel/image matrix it also triggers the raydepsets --check lock-consistency job, which should run when a deplock changes. Split the two concerns additively: - Declare a deplock_check tag and carry it on raydepsets_compile_all_dependencies alongside python_dependencies. - The docs-deplock rule emits `doc doc_api deplock_check` instead of `doc doc_api python_dependencies`. A docs-only deplock change now runs the docbuild, the API-consistency checks, and the raydepsets lock-consistency check, but not the wheel/image build matrix. Every real dependency rule still emits python_dependencies, and the lock-check job carries both tags, so ordinary dependency changes are unaffected. Updated .buildkite/test.rules.test.txt with the new expected tags. Co-Authored-By: Claude Opus 4.8 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
|
Stacked a throwaway demo on top of this branch to produce a real premerge run: #65935. It adds a no-op comment to a docs deplock so premerge routes it through the new tags. Look at the pipeline shape there — the wheel/image matrix should be absent, with |
There was a problem hiding this comment.
Code Review
This pull request introduces a new deplock_check tag to optimize CI runs for docs-only dependency lock changes. Instead of triggering the full wheel/image build matrix via python_dependencies, docs-only lock changes now emit deplock_check, which only runs the lock-consistency verification step. The reviewer pointed out a gap where updates to doc/requirements-doc.txt do not emit deplock_check, meaning out-of-date lock files might not be caught by CI. They suggested updating doc/requirements-doc.txt to also emit deplock_check.
| python/deplocks/docs/*.lock | ||
| ci/raydepsets/configs/docs.depsets.yaml | ||
| @ doc doc_api python_dependencies | ||
| @ doc doc_api deplock_check |
There was a problem hiding this comment.
When doc/requirements-doc.txt is updated, the lock files in python/deplocks/docs/*.lock must be regenerated. However, doc/requirements-doc.txt currently only emits doc doc_api (on line 331) and does not emit deplock_check. This means if a developer updates doc/requirements-doc.txt but forgets to regenerate the lock files, the lock-consistency check (raydepsets_compile_all_dependencies) will not run on the PR, and the out-of-date lock files won't be caught by CI.
To fix this, we should split doc/requirements-doc.txt into its own rule block and have it emit deplock_check as well:
doc/requirements-doc.txt
@ doc doc_api deplock_check
;
Additionally, the corresponding test case in .buildkite/test.rules.test.txt (line 183) should be updated to expect deplock_check.
…, not the Java suite (#65941) ## Problem Editing `.buildkite/dependencies.rayci.yml` runs the Java worker test suite as a generic smoke test, even though the file's real consumers are the dependency and lock-consistency checks it defines. ## Mechanism `.buildkite/test.rules.txt` maps changed files to tags, first match wins. There is no specific rule for `dependencies.rayci.yml`, so it falls through every library `.rayci.yml` rule to the trailing catch-all: ``` .buildkite/*.rayci.yml @ java ``` That catch-all is the deliberate anti-`*`-fan-out fallback: a `.rayci.yml` file with no specific rule runs `java` (a single worker suite) rather than the full `*` matrix. It's the right default for a genuinely unclassified pipeline file, but `dependencies.rayci.yml` is classified. It defines `raydepsets_compile_all_dependencies` (the `raydepsets --check` lock-consistency job), which carries the `deplock_check` tag. Its real blast radius is that check, not `java`. ## Fix Add a specific rule for `.buildkite/dependencies.rayci.yml` ahead of the `.buildkite/*.rayci.yml` catch-all, emitting `deplock_check`. Editing the pipeline now runs the lock-consistency job it defines, without the `java` over-trigger and without fanning out to the wheel/image matrix that `python_dependencies` carries. This is the same additive, one-file-forward move as #65934, one level up from the deplock lock files to the pipeline that defines their check. No existing rule changes behavior. `deplock_check` was added to `raydepsets_compile_all_dependencies` in #65934, so the tag already exists. ## Verification The `test-rules` step validates this PR's rule change against `.buildkite/test.rules.test.txt`, which now records: ``` .buildkite/dependencies.rayci.yml: deplock_check ``` Locally, against the in-repo reference evaluator (`ci/pipeline/determine_tests_to_run.py`): - `.buildkite/dependencies.rayci.yml` emits `deplock_check` (was `java`). - A genuinely unclassified `*.rayci.yml` file still falls to the `java` catch-all. - The per-library `.rayci.yml` rules and the docs-deplock rule are unchanged. - The full `test.rules.test.txt` expectations file revalidates: 134 checks, 0 mismatches, all emitted tags declared. ## Review `test.rules.txt` decides which CI steps run for every PR in the repo, so this is held as a draft pending Ray CI (REEf) sign-off on the rule placement before it goes ready for review. Signed-off-by: Douglas Strodtman <[email protected]>
…, not the Java suite (ray-project#65941) ## Problem Editing `.buildkite/dependencies.rayci.yml` runs the Java worker test suite as a generic smoke test, even though the file's real consumers are the dependency and lock-consistency checks it defines. ## Mechanism `.buildkite/test.rules.txt` maps changed files to tags, first match wins. There is no specific rule for `dependencies.rayci.yml`, so it falls through every library `.rayci.yml` rule to the trailing catch-all: ``` .buildkite/*.rayci.yml @ java ``` That catch-all is the deliberate anti-`*`-fan-out fallback: a `.rayci.yml` file with no specific rule runs `java` (a single worker suite) rather than the full `*` matrix. It's the right default for a genuinely unclassified pipeline file, but `dependencies.rayci.yml` is classified. It defines `raydepsets_compile_all_dependencies` (the `raydepsets --check` lock-consistency job), which carries the `deplock_check` tag. Its real blast radius is that check, not `java`. ## Fix Add a specific rule for `.buildkite/dependencies.rayci.yml` ahead of the `.buildkite/*.rayci.yml` catch-all, emitting `deplock_check`. Editing the pipeline now runs the lock-consistency job it defines, without the `java` over-trigger and without fanning out to the wheel/image matrix that `python_dependencies` carries. This is the same additive, one-file-forward move as ray-project#65934, one level up from the deplock lock files to the pipeline that defines their check. No existing rule changes behavior. `deplock_check` was added to `raydepsets_compile_all_dependencies` in ray-project#65934, so the tag already exists. ## Verification The `test-rules` step validates this PR's rule change against `.buildkite/test.rules.test.txt`, which now records: ``` .buildkite/dependencies.rayci.yml: deplock_check ``` Locally, against the in-repo reference evaluator (`ci/pipeline/determine_tests_to_run.py`): - `.buildkite/dependencies.rayci.yml` emits `deplock_check` (was `java`). - A genuinely unclassified `*.rayci.yml` file still falls to the `java` catch-all. - The per-library `.rayci.yml` rules and the docs-deplock rule are unchanged. - The full `test.rules.test.txt` expectations file revalidates: 134 checks, 0 mismatches, all emitted tags declared. ## Review `test.rules.txt` decides which CI steps run for every PR in the repo, so this is held as a draft pending Ray CI (REEf) sign-off on the rule placement before it goes ready for review. Signed-off-by: Douglas Strodtman <[email protected]>
…ray-project#65934) ## Problem A docs-only dependency change — `doc/requirements-doc.txt` plus its regenerated `python/deplocks/docs/*.lock` — triggers the full wheel and image build matrix across architectures on premerge. That is heavy for a change that cannot affect any shipped artifact: the docs deplock feeds only the Sphinx docbuild image and is never installed into a Ray wheel or image. Observed on ray-project#65875 (a `setuptools` docs pin bump): https://buildkite.com/ray-project/premerge/builds/72805 We expect these docs dependency bumps to become frequent (a docs dependency staleness/security cleanup is underway), so each one currently pays for the whole matrix. ## Mechanism `.buildkite/test.rules.txt` maps the docs deplock to tags: ``` python/deplocks/docs/*.lock ci/raydepsets/configs/docs.depsets.yaml @ doc doc_api python_dependencies ``` The over-trigger is `python_dependencies`. Nearly every wheel and image build step (`build.rayci.yml`, `linux_aarch64.rayci.yml`, `macos.rayci.yml`, `_images.rayci.yml`) carries it, because for a *real* requirements change it means "dependencies changed, rebuild and retest wheels." The `doc` / `doc_api` tags already cover everything a docs-deplock change can actually affect (docbuild, RtD, the two API-consistency checks). The subtlety: `python_dependencies` does double duty. It also triggers the `raydepsets --check` lock-consistency job (`raydepsets_compile_all_dependencies` in `dependencies.rayci.yml`), which *should* run when any deplock changes. A blind "drop `python_dependencies` from the docs rule" would also drop that check. ## This change Split the two concerns **additively**, so no existing dependency rule changes behavior: - Declare a `deplock_check` tag. - Carry `deplock_check` on `raydepsets_compile_all_dependencies` **alongside** `python_dependencies`. Real dependency changes still reach it via `python_dependencies` (unchanged); a docs-deplock change reaches it via `deplock_check` without the matrix. - The docs-deplock rule emits `@ doc doc_api deplock_check` instead of `@ doc doc_api python_dependencies`. `pip_compile_dependencies` is deliberately left on `python_dependencies` only — it verifies `python/requirements_compiled.txt`, which a docs deplock never touches. ### Why not tag the check with `doc` An alternative is to give the lock-check job a `doc`-or-narrower trigger. But `raydepsets --check` runs `--all-configs`, and `doc` fires on nearly every prose docs PR, so the check (a manylinux build) would run on every `.md`/`.rst` edit. The dedicated `deplock_check` tag fires only when a lock or depset config actually changes. ## Verification Local dry-run against the edited rules (Ray's in-repo reference evaluator, `ci/pipeline/determine_tests_to_run.py`): - `python/deplocks/docs/docbuild_depset_py3.11.lock` → `doc doc_api deplock_check` (no `python_dependencies`). - `ci/raydepsets/configs/docs.depsets.yaml` → `doc doc_api deplock_check`. - Control — real dependency files (`python/requirements.txt`, `python/deplocks/ci/*.lock`, `python/deplocks/llm/*.lock`, depset configs) still emit the full `python_dependencies` fan-out, unchanged. Step-dependency trace (tags are a lower bound; `markDeps` pulls in `depends_on` chains regardless of tags): the surviving `doc` / `doc_api` / `deplock_check` steps depend only on `docbuild` (which installs the docs lock via `REQUIREMENTS_FILE`), `ray-core-build(py3.11)`, base CI images, and `manylinux` / `forge` — none of the `python_dependencies` wheel/image matrix steps. So the matrix genuinely drops, while the docbuild rebuild that must pick up the new lock still runs. `.buildkite/test.rules.test.txt` is updated with the new expected tags; the `test-rules` premerge check validates it authoritatively. ## For Ray CI review `test.rules.txt` and the `python_dependencies` tag are shared CI surface, so this needs a Ray CI call on the tag design — flagging @elliot-barn (REEf). Open questions: 1. Is `deplock_check` the tag name/shape you want, or would you prefer splitting `python_dependencies` itself into "verify locks" vs "rebuild wheels"? 2. `deplock_check` is on `raydepsets_compile_all_dependencies` only; `pip_compile_dependencies` stays `python_dependencies`-only. Agree that's the right boundary for a docs deplock? Holding this as a **draft** pending that sign-off and a green premerge that shows the wheel/image matrix dropping on a real docs-deplock change (this PR touches the rules, not a docs lock, so a follow-up test push or a check on the next real docs-deplock PR confirms it end to end). ## Done when A docs-only dependency change (`requirements-doc.txt` + docs deplock) runs the doc build, the API-consistency checks, and the lock-consistency check — but not the wheel/image build matrix — verified on a real premerge build. Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]>
…, not the Java suite (ray-project#65941) ## Problem Editing `.buildkite/dependencies.rayci.yml` runs the Java worker test suite as a generic smoke test, even though the file's real consumers are the dependency and lock-consistency checks it defines. ## Mechanism `.buildkite/test.rules.txt` maps changed files to tags, first match wins. There is no specific rule for `dependencies.rayci.yml`, so it falls through every library `.rayci.yml` rule to the trailing catch-all: ``` .buildkite/*.rayci.yml @ java ``` That catch-all is the deliberate anti-`*`-fan-out fallback: a `.rayci.yml` file with no specific rule runs `java` (a single worker suite) rather than the full `*` matrix. It's the right default for a genuinely unclassified pipeline file, but `dependencies.rayci.yml` is classified. It defines `raydepsets_compile_all_dependencies` (the `raydepsets --check` lock-consistency job), which carries the `deplock_check` tag. Its real blast radius is that check, not `java`. ## Fix Add a specific rule for `.buildkite/dependencies.rayci.yml` ahead of the `.buildkite/*.rayci.yml` catch-all, emitting `deplock_check`. Editing the pipeline now runs the lock-consistency job it defines, without the `java` over-trigger and without fanning out to the wheel/image matrix that `python_dependencies` carries. This is the same additive, one-file-forward move as ray-project#65934, one level up from the deplock lock files to the pipeline that defines their check. No existing rule changes behavior. `deplock_check` was added to `raydepsets_compile_all_dependencies` in ray-project#65934, so the tag already exists. ## Verification The `test-rules` step validates this PR's rule change against `.buildkite/test.rules.test.txt`, which now records: ``` .buildkite/dependencies.rayci.yml: deplock_check ``` Locally, against the in-repo reference evaluator (`ci/pipeline/determine_tests_to_run.py`): - `.buildkite/dependencies.rayci.yml` emits `deplock_check` (was `java`). - A genuinely unclassified `*.rayci.yml` file still falls to the `java` catch-all. - The per-library `.rayci.yml` rules and the docs-deplock rule are unchanged. - The full `test.rules.test.txt` expectations file revalidates: 134 checks, 0 mismatches, all emitted tags declared. ## Review `test.rules.txt` decides which CI steps run for every PR in the repo, so this is held as a draft pending Ray CI (REEf) sign-off on the rule placement before it goes ready for review. Signed-off-by: Douglas Strodtman <[email protected]>
Problem
A docs-only dependency change —
doc/requirements-doc.txtplus its regeneratedpython/deplocks/docs/*.lock— triggers the full wheel and image build matrix across architectures on premerge. That is heavy for a change that cannot affect any shipped artifact: the docs deplock feeds only the Sphinx docbuild image and is never installed into a Ray wheel or image.Observed on #65875 (a
setuptoolsdocs pin bump): https://buildkite.com/ray-project/premerge/builds/72805We expect these docs dependency bumps to become frequent (a docs dependency staleness/security cleanup is underway), so each one currently pays for the whole matrix.
Mechanism
.buildkite/test.rules.txtmaps the docs deplock to tags:The over-trigger is
python_dependencies. Nearly every wheel and image build step (build.rayci.yml,linux_aarch64.rayci.yml,macos.rayci.yml,_images.rayci.yml) carries it, because for a real requirements change it means "dependencies changed, rebuild and retest wheels." Thedoc/doc_apitags already cover everything a docs-deplock change can actually affect (docbuild, RtD, the two API-consistency checks).The subtlety:
python_dependenciesdoes double duty. It also triggers theraydepsets --checklock-consistency job (raydepsets_compile_all_dependenciesindependencies.rayci.yml), which should run when any deplock changes. A blind "droppython_dependenciesfrom the docs rule" would also drop that check.This change
Split the two concerns additively, so no existing dependency rule changes behavior:
deplock_checktag.deplock_checkonraydepsets_compile_all_dependenciesalongsidepython_dependencies. Real dependency changes still reach it viapython_dependencies(unchanged); a docs-deplock change reaches it viadeplock_checkwithout the matrix.@ doc doc_api deplock_checkinstead of@ doc doc_api python_dependencies.pip_compile_dependenciesis deliberately left onpython_dependenciesonly — it verifiespython/requirements_compiled.txt, which a docs deplock never touches.Why not tag the check with
docAn alternative is to give the lock-check job a
doc-or-narrower trigger. Butraydepsets --checkruns--all-configs, anddocfires on nearly every prose docs PR, so the check (a manylinux build) would run on every.md/.rstedit. The dedicateddeplock_checktag fires only when a lock or depset config actually changes.Verification
Local dry-run against the edited rules (Ray's in-repo reference evaluator,
ci/pipeline/determine_tests_to_run.py):python/deplocks/docs/docbuild_depset_py3.11.lock→doc doc_api deplock_check(nopython_dependencies).ci/raydepsets/configs/docs.depsets.yaml→doc doc_api deplock_check.python/requirements.txt,python/deplocks/ci/*.lock,python/deplocks/llm/*.lock, depset configs) still emit the fullpython_dependenciesfan-out, unchanged.Step-dependency trace (tags are a lower bound;
markDepspulls independs_onchains regardless of tags): the survivingdoc/doc_api/deplock_checksteps depend only ondocbuild(which installs the docs lock viaREQUIREMENTS_FILE),ray-core-build(py3.11), base CI images, andmanylinux/forge— none of thepython_dependencieswheel/image matrix steps. So the matrix genuinely drops, while the docbuild rebuild that must pick up the new lock still runs..buildkite/test.rules.test.txtis updated with the new expected tags; thetest-rulespremerge check validates it authoritatively.For Ray CI review
test.rules.txtand thepython_dependenciestag are shared CI surface, so this needs a Ray CI call on the tag design — flagging @elliot-barn (REEf). Open questions:deplock_checkthe tag name/shape you want, or would you prefer splittingpython_dependenciesitself into "verify locks" vs "rebuild wheels"?deplock_checkis onraydepsets_compile_all_dependenciesonly;pip_compile_dependenciesstayspython_dependencies-only. Agree that's the right boundary for a docs deplock?Holding this as a draft pending that sign-off and a green premerge that shows the wheel/image matrix dropping on a real docs-deplock change (this PR touches the rules, not a docs lock, so a follow-up test push or a check on the next real docs-deplock PR confirms it end to end).
Done when
A docs-only dependency change (
requirements-doc.txt+ docs deplock) runs the doc build, the API-consistency checks, and the lock-consistency check — but not the wheel/image build matrix — verified on a real premerge build.