Skip to content

Forward RAYCI_PYPI_MIRROR_URL into build containers - #498

Open
elliot-barn wants to merge 1 commit into
mainfrom
elliot-barn/pypi-mirror-env
Open

Forward RAYCI_PYPI_MIRROR_URL into build containers#498
elliot-barn wants to merge 1 commit into
mainfrom
elliot-barn/pypi-mirror-env

Conversation

@elliot-barn

Copy link
Copy Markdown
Collaborator

What

Adds RAYCI_PYPI_MIRROR_URL to the env allowlist the docker plugin receives, so a value set on the agent reaches the build container. Name only — no value, no per-pipeline logic.

Why

Ray CI is moving to resolving Python packages through a caching mirror in front of PyPI. The intermittent 502s from files.pythonhosted.org (pypi/support#11895) do not clear on retry — measured on premerge 72083, pip with --retries=50 over ~8 minutes still failed with too many 502 error responses, while 47 of 62 job-level retries in the same build passed, because in-process retries reuse the connection and anycast keeps them on the same bad edge. A cache that fetches each (package, version) once is the fix; more attempts are not.

The mirror URL differs per fleet, and each deployment is only reachable from inside its own VPC, so it can't be a constant in the repos that run here. It has to arrive as agent environment — and dockerPluginEnvList only forwards what this list names, so today a variable set on the agent stops at the container boundary.

Impact

None where the variable is unset, which is everywhere until a fleet opts in: consumers fall back to their own default and from there to public PyPI. go test ./raycicmd/... passes.

CI is moving to resolving Python packages through a caching mirror in front of
PyPI, because the intermittent 502s from files.pythonhosted.org
(pypi/support#11895) do not clear on retry: the client stays pinned to the same
bad edge, so a cache that fetches each package version once is the fix rather
than more attempts.

The mirror URL differs per fleet and each one is only reachable from inside its
own VPC, so it cannot be a constant in the repos that run here. It has to arrive
as agent environment, and the docker plugin only passes through what this list
names, so a variable set on the agent otherwise stops at the container boundary.

Name only: no fleet-specific value lands in this repo, and where the variable is
unset nothing changes -- consumers fall back to their own default, and from
there to public PyPI.

Signed-off-by: Ray CI Test <rayci@ray.io>

@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 adds the RAYCI_PYPI_MIRROR_URL environment variable to the list of forwarded Buildkite environment variables (buildkiteEnvs) in raycicmd/bk_pipeline.go. This allows forwarding the package index URL used by CI to resolve dependencies per fleet. There are no review comments, and we have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant