Skip to content

[ci] fix BUILDKITE_BAZEL_CACHE_URL scope in manylinux-retag#62758

Closed
aslonnie wants to merge 2 commits into
ray-project:masterfrom
anyscale:lonnie-260419-argfix
Closed

[ci] fix BUILDKITE_BAZEL_CACHE_URL scope in manylinux-retag#62758
aslonnie wants to merge 2 commits into
ray-project:masterfrom
anyscale:lonnie-260419-argfix

Conversation

@aslonnie
Copy link
Copy Markdown
Collaborator

declare ARG below FROM and explicitly re-set ENV from the ARG value, so the rayturbo build_arg takes effect in the RUN and /home/forge/.bazelrc is written with the correct cache URL.

declare ARG below FROM and explicitly re-set ENV from the ARG value, so
the rayturbo build_arg takes effect in the RUN and /home/forge/.bazelrc
is written with the correct cache URL.

Signed-off-by: Lonnie Liu <95255098+aslonnie@users.noreply.github.com>
@aslonnie aslonnie requested a review from a team as a code owner April 19, 2026 16:58
aslonnie added a commit to anyscale/ray that referenced this pull request Apr 19, 2026
declare ARG below FROM and explicitly re-set ENV from the ARG value, so
the rayturbo build_arg takes effect in the RUN and /home/forge/.bazelrc
is written with the correct cache URL.

Signed-off-by: Lonnie Liu <95255098+aslonnie@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

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

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 modifies the manylinux-retag.Dockerfile by moving the BUILDKITE_BAZEL_CACHE_URL argument after the FROM instruction and adding an ENV declaration. The review feedback correctly identifies that the ENV instruction is redundant because ARG values are already available during the build stage, and persisting this variable in the image metadata is unnecessary since it is already baked into the configuration files or provided at runtime.

Comment on lines +13 to +14
ARG BUILDKITE_BAZEL_CACHE_URL
ENV BUILDKITE_BAZEL_CACHE_URL=${BUILDKITE_BAZEL_CACHE_URL}
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

The ENV instruction on line 14 is redundant. In Docker, ARG values are automatically available as environment variables during the execution of RUN commands within the same build stage, so the ENV line is not needed for the subsequent RUN block to work.

Furthermore, using ENV persists the build-time value into the image's runtime environment. This is unnecessary here because:

  1. The RUN block already bakes the cache URL directly into the .bazelrc file.
  2. The CI runner (ci/ray_ci/container.py) explicitly passes the correct environment variable at runtime, which would override this image-level default anyway.

Removing the ENV line keeps the image metadata cleaner and avoids baking in a potentially stale default URL.

ARG BUILDKITE_BAZEL_CACHE_URL

aslonnie added a commit that referenced this pull request Apr 19, 2026
declare ARG below FROM and explicitly re-set ENV from the ARG value, so
the rayturbo build_arg takes effect in the RUN and /home/forge/.bazelrc
is written with the correct cache URL.

Signed-off-by: Lonnie Liu <95255098+aslonnie@users.noreply.github.com>
@aslonnie aslonnie enabled auto-merge (squash) April 19, 2026 17:33
@github-actions github-actions Bot added the go add ONLY when ready to merge, run all tests label Apr 19, 2026
@github-actions github-actions Bot disabled auto-merge April 19, 2026 17:54
@aslonnie aslonnie enabled auto-merge (squash) April 19, 2026 18:13
@aslonnie
Copy link
Copy Markdown
Collaborator Author

prefers #62723

@aslonnie aslonnie closed this Apr 19, 2026
auto-merge was automatically disabled April 19, 2026 18:33

Pull request was closed

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