Repository navigation
[ci] Stop exporting an image index the build cannot reach - #65603
Merged
Merged
Conversation
This broke every wheel build on master. postmerge 19281 failed
wanda: wheel py3.{10,11,12,13} on 8ed2aa2 -- the commit that added the agent hook --
where 19280 passed on the commit before it.
pip inside the image build was pointed at the agent's docker bridge gateway, could not
reach it, and reported:
export RAYCI_IMAGE_PIP_INDEX_URL=http://172.17.0.1:35999/simple
ERROR: Could not find a version that satisfies the requirement cython==3.0.12
(from versions: none)
with no 502 and no origin fetch, because it never reached any index at all.
Two mistakes compounded. The gateway is not the address a build can reach: premerge 72149
measured a docker build reaching a *step container* on the bridge (172.16.0.2), which is a
different hop from reaching the *host* at the bridge gateway, and I treated them as the
same. And the fail-open does not extend into an image build -- ray-wheel.Dockerfile reads
${RAYCI_IMAGE_PIP_INDEX_URL:-https://pypi.org/simple}, so an absent value falls back to
PyPI while a present-but-unreachable one fails the build outright. Setting it was strictly
worse than leaving it unset.
The loopback export stays. That half is proven: release 104832's init resolved 562 bazel
repositories with zero direct fetches to files.pythonhosted.org, where 104694 failed on
aiobotocore and 104736 survived on luck.
Restoring the image half needs an address verified from inside a build on the agent that
will run it, not inferred from docker network inspect.
AI assistance (Claude Code) was used for this change.
Signed-off-by: elliot-barn <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the export of RAYCI_IMAGE_PIP_INDEX_URL from ci/pypi_proxy_agent.sh and adds an explanatory comment detailing how the previous implementation broke wheel builds on master due to unreachable gateway addresses. There are no review comments on this pull request, so no additional feedback is provided.
elliot-barn
added a commit
that referenced
this pull request
Aug 19, 2026
Restores the image-build index that #65603 removed, using the mechanism that works rather than the one that did not. wanda now passes --add-host rayci.localhost:host-gateway (rayci#501), so a build resolves the agent by name and docker computes the address itself. The previous attempt inferred it from `docker network inspect bridge`, the build could not reach what that returned, and every wheel build on master failed (postmerge 19281 against 19280) -- because ray-wheel.Dockerfile reads ${RAYCI_IMAGE_PIP_INDEX_URL:-https://pypi.org/simple}, a present-but-unreachable value fails the build outright where an absent one falls back. --add-host rather than --network=host, which also reaches the agent: that shares the agent's whole network namespace with the build, including anything on loopback. This adds one hosts entry and leaves the namespace intact. rayci.localhost is the name ci/ray_ci/linux_container.py already passes to `docker run`, so the agent is addressed identically from a test container and from an image build. Gated on the pinned rayci version rather than on merge order, because exporting against a wanda that does not pass the flag reproduces the same failure. Verified both ways: with .rayciversion at 0.46.0 nothing is exported and the log says why; at 0.47.0 the name is exported. The .rayciversion bump can therefore land before, after, or with this. AI assistance (Claude Code) was used for this change. Signed-off-by: elliot-barn <[email protected]>
elliot-barn
added a commit
that referenced
this pull request
Aug 20, 2026
Windows is the last platform still resolving from files.pythonhosted.org (pypi/support#11895), and it needs its own entry point: the two places that install packages there are not login shells, so the profile.d hook the Linux images use never runs. `RUN bash build_ray.sh` inside the docker build the tester starts, and the command list the wheel builder passes to `docker run`, both source ci/ray_ci/windows/pypi_proxy.sh explicitly. The proxy runs inside the container on loopback rather than on the agent. The Windows host carries Python 3.8, below what the proxy supports, while conda in the image supplies 3.10 -- enough, since the only dependency needing 3.11 is skipped by the installer and guarded at import. Loopback also means pip and uv accept it over plain HTTP with no trusted-host handling, and the venv is baked into the windowsbuild image by build_base.sh, so nothing is installed at job time. Two shared pieces gain Windows support rather than being copied: install_pypi_proxy.sh picks Scripts/ over bin/ for the venv, and pypi_proxy_profile.sh takes the interpreter from RAYCI_PYPI_PROXY_PYTHON when a caller names it, which ci/pypi_proxy_agent.sh already does for the same reason. Every failure path leaves the environment untouched, so a job resolves from public PyPI exactly as it does today. Rebased onto master: the earlier revision of this branch predated the agent hook (#65602), the bazel downloader rewrite (#65599) and the index-shape correction (#65603), and would have reverted all three. Tested: bash -n over the five touched shell scripts. The Windows paths themselves need a windowsbuild image build to exercise, which is what this PR's premerge does. AI assistance was used for this change. Signed-off-by: Elliot Barnwell <[email protected]> Signed-off-by: elliot-barn <[email protected]>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…t#65603) Fixes wheel builds broken on master by ray-project#65602. postmerge 19281 failed `wanda: wheel py3.{10,11,12,13}` on `8ed2aa20e` (the hook commit); 19280 passed on the commit before. Release build 104832 shows the same failure on `wanda: wheel py3.11/py3.12`. pip inside the image build was pointed at the agent's bridge gateway, could not reach it, and failed with `cython==3.0.12 (from versions: none)` — no 502, no origin fetch, no index at all. **Why it was worse than a no-op:** `ray-wheel.Dockerfile` reads `${RAYCI_IMAGE_PIP_INDEX_URL:-https://pypi.org/simple}`, so an *absent* value falls back to PyPI while a *present but unreachable* one fails hard. The fail-open that protects every other path does not extend into an image build. **What I got wrong:** premerge 72149 proved a docker build could reach a *step container* on the bridge (172.16.0.2). Reaching the *host* at the bridge gateway is a different hop, and I conflated them. **The loopback export stays**, and it is proven: 104832's `init` resolved 562 bazel repositories with zero direct fetches to files.pythonhosted.org, where 104694 failed on `aiobotocore`. Restoring the image half needs an address verified from inside a build on the agent that will run it. AI assistance (Claude Code) was used for this change. Signed-off-by: elliot-barn <[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.
Fixes wheel builds broken on master by #65602.
postmerge 19281 failed
wanda: wheel py3.{10,11,12,13}on8ed2aa20e(the hook commit); 19280 passed on the commit before. Release build 104832 shows the same failure onwanda: wheel py3.11/py3.12.pip inside the image build was pointed at the agent's bridge gateway, could not reach it, and failed with
cython==3.0.12 (from versions: none)— no 502, no origin fetch, no index at all.Why it was worse than a no-op:
ray-wheel.Dockerfilereads${RAYCI_IMAGE_PIP_INDEX_URL:-https://pypi.org/simple}, so an absent value falls back to PyPI while a present but unreachable one fails hard. The fail-open that protects every other path does not extend into an image build.What I got wrong: premerge 72149 proved a docker build could reach a step container on the bridge (172.16.0.2). Reaching the host at the bridge gateway is a different hop, and I conflated them.
The loopback export stays, and it is proven: 104832's
initresolved 562 bazel repositories with zero direct fetches to files.pythonhosted.org, where 104694 failed onaiobotocore.Restoring the image half needs an address verified from inside a build on the agent that will run it.
AI assistance (Claude Code) was used for this change.