Skip to content

[raycicmd] Give job containers the agent's name - #503

Merged
elliot-barn merged 1 commit into
mainfrom
elliot-barn/jobenv-add-host
Aug 20, 2026
Merged

elliot-barn merged 1 commit into
mainfrom
elliot-barn/jobenv-add-host

Conversation

@elliot-barn

@elliot-barn elliot-barn commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds add-host: rayci.localhost:host-gateway to the docker buildkite plugin config that makeRayDockerPlugin emits for job containers.

Wanda's docker build (#501) and ray's ci/ray_ci/linux_container.py both already pass this mapping, so a service listening on the agent — the package index proxy — is reachable by one stable name from an image build and from a test container. Containers rayci starts through the docker buildkite plugin were the one launcher missing it.

The gap became visible when ray's CI images started baking the name into PIP_INDEX_URL (ray-project/ray#65578, armed by ray-project/ray#65605): any job_env step that runs pip at runtime resolves the baked index and fails DNS with [Errno -5] No address associated with hostname. Observed on ray's doc: check API annotations / check API doc consistency (via setuptools fetch_build_eggs for cython), pyrefly type check and build: pip-compile dependencies (direct runtime pip installs).

The mapping is emitted unconditionally, matching the other two launchers. The docker buildkite plugin v5.8.0 supports add-host natively (verified in its plugin.yml). Agents where nothing listens on the name are unaffected — the entry only matters to a container that dials it.

Testing

  • New TestMakeRayDockerPlugin_addHost asserts the emitted mapping.
  • go test ./raycicmd passes; go test ./... green except pre-existing local-env failures in raycilint (host git too old for --initial-branch), identical on clean main.

Rollout note: after this merges and a release is cut, ray consumes it via .rayciversion; the pyrefly type check step is a live canary since it still pip-installs at runtime.

AI assistance (Claude Code) was used to prepare this change.

🤖 Generated with Claude Code

@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 configures the Docker plugin in raycicmd/bk_pipeline.go to include the add-host mapping for rayci.localhost:host-gateway, preventing DNS resolution failures during runtime pip installations. It also adds a corresponding unit test in raycicmd/bk_pipeline_test.go to verify this configuration. There are no review comments, and I have no additional feedback to provide.

@elliot-barn
elliot-barn force-pushed the elliot-barn/jobenv-add-host branch from 66ce66c to ef489c7 Compare August 20, 2026 21:19
Wanda's docker build and ci/ray_ci/linux_container.py both pass
--add-host rayci.localhost:host-gateway, so a service listening on the
agent -- the package index proxy -- is reachable by the same name from
an image build and from a test container. Containers that rayci starts
through the docker buildkite plugin were the one launcher missing the
mapping.

That gap became visible when ray's CI images started baking the name
into PIP_INDEX_URL (ray#65578, armed by ray#65605): any job_env step
that runs pip at runtime resolves the baked index, fails DNS with
"[Errno -5] No address associated with hostname", and dies. Observed
on ray's doc API checks (via setuptools fetch_build_eggs), pyrefly
type check, and pip-compile dependencies (direct runtime pip installs).

The docker buildkite plugin v5.8.0 supports add-host natively, so this
emits the same mapping unconditionally, matching the other two
launchers. Agents where nothing listens on the name are unaffected:
the entry only matters to a container that dials it.

Signed-off-by: Ray CI Test <rayci@ray.io>
@elliot-barn
elliot-barn force-pushed the elliot-barn/jobenv-add-host branch from ef489c7 to e38dcbf Compare August 20, 2026 21:28
@elliot-barn
elliot-barn merged commit 52b3334 into main Aug 20, 2026
1 of 2 checks passed
@elliot-barn
elliot-barn deleted the elliot-barn/jobenv-add-host branch August 20, 2026 21:32
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