Repository navigation
[doc] Bump the setuptools docs pin past the old redoc ceiling - #65875
Conversation
03c32b6 to
759b962
Compare
There was a problem hiding this comment.
Code Review
This pull request unpins setuptools in doc/requirements-doc.txt and updates its locked version to 84.0.0 in the lockfile. The reviewer suggests pinning setuptools to 84.0.0 in the requirements file as well to ensure reproducible builds on Read the Docs, which uses this file directly.
| setuptools==80.9.0 | ||
| # 82.0.0 removed it, and that extension was replaced with sphinxcontrib-openapi | ||
| # (which needs neither). | ||
| setuptools |
There was a problem hiding this comment.
Since doc/requirements-doc.txt is directly used by Read the Docs (RTD) to build the documentation, leaving setuptools completely unpinned can lead to non-reproducible builds if a future release of setuptools introduces breaking changes. Pinning setuptools to the same version as the lockfile (84.0.0) provides build stability and consistency between local locked environments and RTD.
setuptools==84.0.0
There was a problem hiding this comment.
Thanks — agreed on keeping it pinned, and I've bumped the pin to setuptools==84.0.0 here (matching the deplock) rather than leaving it unpinned.
One clarification for the thread: Read the Docs installs the hash-pinned deplock (doc/requirements-doc.lock.txt, per .readthedocs.yaml), not doc/requirements-doc.txt directly, so the RtD build is already reproducible from the lock. The reason to keep the explicit source pin is a bit different: it keeps deplock regeneration deterministic and keeps setuptools under Dependabot's watch so version bumps keep arriving. Verified the docs still build cleanly at 84.0.0 with an RtD-faithful make -C doc rtd-build.
The setuptools==80.9.0 pin carried a <82 ceiling that existed for one reason: sphinxcontrib-redoc imported pkg_resources at module load and setuptools 82.0.0 removed it. With redoc replaced by sphinxcontrib-openapi (which needs neither), no extension needs pkg_resources, so the ceiling is obsolete. Bump the pin to setuptools==84.0.0 in both doc/requirements-doc.txt and the docs deplock, keeping it pinned rather than removing it. An explicit pin keeps deplock regeneration deterministic and keeps setuptools under Dependabot's watch so bumps keep arriving. Read the Docs installs the hash-pinned deplock (doc/requirements-doc.lock.txt), so build reproducibility is anchored there regardless. Verified with an RtD-faithful clean build (make -C doc rtd-build, which builds with -W): the docs build succeeds with setuptools 84.0.0 and Sphinx 8.2.3, confirming no remaining extension imports pkg_resources at load. Signed-off-by: Douglas Strodtman <[email protected]>
759b962 to
2870b85
Compare
…#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 #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]>
…oject#65875) > **Stacked on ray-project#65460** (redoc → `sphinxcontrib-openapi`), which removes the `pkg_resources` importer that forced the `setuptools<82` ceiling. That PR must merge first, so this stays a **draft** until then. GitHub retargets this to `master` automatically when ray-project#65460 merges. ## Why The `setuptools==80.9.0` pin in `doc/requirements-doc.txt` carried a `<82` ceiling that existed for exactly one reason: `sphinxcontrib-redoc` imported `pkg_resources` at module load, and setuptools 82.0.0 removed `pkg_resources`. ray-project#65460 replaces redoc with `sphinxcontrib-openapi` (which needs neither) and verified that every extension `conf.py` loads imports cleanly with no setuptools and no importable `pkg_resources`. The ceiling is obsolete, and ray-project#65460 deliberately left lifting the pin to this follow-up. ## What changes - Unpin `setuptools` in `doc/requirements-doc.txt`. The deplock pins the resolved version. ## Remaining before un-drafting (finish-time gates, on the final ray-project#65460 base) - [x] Regenerate `python/deplocks/docs/docbuild_depset_py3.11.lock` via raydepsets; confirm `raydepsets --check`. - [x] `make -C doc rtd-build`: build succeeded, zero warnings under `-W`, confirming the current setuptools release resolves and builds. Deferred on purpose: ray-project#65460 is still in review and will likely rebase before it merges, which would rot a lock regenerated now. Both gates run against its final base once it lands. Open question for review: unpin (this PR) vs. bump-and-pin to a specific current release. Unpinning matches the file's existing floating entries (for example `sphinxemoji>=0.3.2`) and defers the exact version to the lock; happy to pin a fixed setuptools instead if the team prefers. 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]>
Why
The
setuptools==80.9.0pin indoc/requirements-doc.txtcarried a<82ceiling that existed for exactly one reason:sphinxcontrib-redocimportedpkg_resourcesat module load, and setuptools 82.0.0 removedpkg_resources. #65460 replaces redoc withsphinxcontrib-openapi(which needs neither) and verified that every extensionconf.pyloads imports cleanly with no setuptools and no importablepkg_resources. The ceiling is obsolete, and #65460 deliberately left lifting the pin to this follow-up.What changes
setuptoolsindoc/requirements-doc.txt. The deplock pins the resolved version.Remaining before un-drafting (finish-time gates, on the final #65460 base)
python/deplocks/docs/docbuild_depset_py3.11.lockvia raydepsets; confirmraydepsets --check.make -C doc rtd-build: build succeeded, zero warnings under-W, confirming the current setuptools release resolves and builds.Deferred on purpose: #65460 is still in review and will likely rebase before it merges, which would rot a lock regenerated now. Both gates run against its final base once it lands.
Open question for review: unpin (this PR) vs. bump-and-pin to a specific current release. Unpinning matches the file's existing floating entries (for example
sphinxemoji>=0.3.2) and defers the exact version to the lock; happy to pin a fixed setuptools instead if the team prefers.