Skip to content

[ci] Scope docs-only deplock changes off the wheel/image build matrix - #65934

Merged
dstrodtman merged 1 commit into
masterfrom
doc-1646-scope-docs-deplock-ci
Sep 4, 2026
Merged

dstrodtman merged 1 commit into
masterfrom
doc-1646-scope-docs-deplock-ci

Conversation

@dstrodtman

Copy link
Copy Markdown
Contributor

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 #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.

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]>
@dstrodtman

Copy link
Copy Markdown
Contributor Author

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 doc/doc_api/deplock_check present. The raydepsets --check step is expected red on the demo (the comment is stripped on regeneration), which just confirms deplock_check is wired and running. Don't merge #65935.

@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label Sep 4, 2026
@dstrodtman
dstrodtman marked this pull request as ready for review September 4, 2026 16:53
@dstrodtman
dstrodtman requested a review from a team as a code owner September 4, 2026 16:53
@dstrodtman
dstrodtman enabled auto-merge (squash) September 4, 2026 16:53

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .buildkite/test.rules.txt
python/deplocks/docs/*.lock
ci/raydepsets/configs/docs.depsets.yaml
@ doc doc_api python_dependencies
@ doc doc_api deplock_check

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

@dstrodtman
dstrodtman merged commit a4ca5e5 into master Sep 4, 2026
7 checks passed
@dstrodtman
dstrodtman deleted the doc-1646-scope-docs-deplock-ci branch September 4, 2026 18:18
dstrodtman added a commit that referenced this pull request Sep 21, 2026
…, 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]>
owenowenisme pushed a commit to owenowenisme/ray that referenced this pull request Sep 23, 2026
…, 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]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…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]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…, 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants