Skip to content

[apiserver][test] Trust E2E_API_SERVER_RAY_IMAGE verbatim (closes #4346)#4770

Open
1fanwang wants to merge 2 commits intoray-project:masterfrom
1fanwang:apiserver-test-trust-image-env-4346
Open

[apiserver][test] Trust E2E_API_SERVER_RAY_IMAGE verbatim (closes #4346)#4770
1fanwang wants to merge 2 commits intoray-project:masterfrom
1fanwang:apiserver-test-trust-image-env-4346

Conversation

@1fanwang
Copy link
Copy Markdown

@1fanwang 1fanwang commented Apr 27, 2026

Why are these changes needed?

withRayImage in apiserver/test/e2e/types.go and apiserver/test/e2e/apiserversdk/types.go second-guesses the configured Ray image: when runtime.GOARCH == "arm64", it auto-appends -aarch64 to whatever E2E_API_SERVER_RAY_IMAGE is set to. This prevents Apple-silicon developers from running the apiserver e2e suite against an x86_64-only remote cluster — the use case reported in #4346.

#4348 already removed the same pattern from ray-operator/test/support/environment.go. This PR applies the same cleanup to the two remaining occurrences in the apiserver tests, completing #4346.

apiserver/Makefile:14-16 already provides the correct arm64-suffixed default for arm64 hosts via ifeq (arm64, $(shell go env GOARCH)), so make test behavior on arm64 is preserved without any in-Go-code mangling.

Related issue number

Closes #4346.
Follow-up to #4348.

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests — go build ./... and go vet ./test/... pass on darwin/arm64. The change is a pure deletion mirroring the merged Support Multi-Arch Image in CI #4348; CI will exercise the Makefile path on both arm64 and amd64 runners.
    • This PR is not tested :(

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 918b54a. Configure here.

Comment thread apiserver/test/e2e/types.go
The apiserver e2e helpers `withRayImage` in `apiserver/test/e2e/types.go`
and `apiserver/test/e2e/apiserversdk/types.go` second-guess the configured
image: when `runtime.GOARCH == "arm64"` they auto-append `-aarch64`. This
prevents Apple-silicon developers from running the suite against an
x86_64-only remote cluster, even when they explicitly set
`E2E_API_SERVER_RAY_IMAGE` to an x86_64 image.

PR ray-project#4348 already removed the same pattern from
`ray-operator/test/support/environment.go`. This change applies the same
cleanup to the two remaining occurrences, completing ray-project#4346.

`apiserver/Makefile:14-16` already provides the correct arm64-suffixed
default for arm64 hosts via `ifeq (arm64, $(shell go env GOARCH))`, so
`make test` behavior on arm64 is preserved.

Signed-off-by: 1fanwang <1fannnw@gmail.com>
Without `export`, Make-defined defaults don't propagate to the `go test`
subprocess in `e2e-test`, so the e2e helpers fall back to their hard-coded
defaults. On arm64 hosts running `make local-e2e-test`, this caused
`load-ray-test-image` to preload `rayproject/ray:2.46.0-py310-aarch64`
into kind while the Go test would (post the previous commit) ask for
`rayproject/ray:2.46.0-py310` — a mismatch caught by Cursor Bugbot in the
PR review.

Exporting both vars makes the Makefile the single source of truth for the
target image and base URL, restoring the on-arm64 behavior that the in-Go
GOARCH detection used to mask.

Signed-off-by: 1fanwang <1fannnw@gmail.com>
@1fanwang 1fanwang force-pushed the apiserver-test-trust-image-env-4346 branch 2 times, most recently from 54e6d55 to b0af3b1 Compare April 27, 2026 09:23
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.

[Test] Support pass test image from environment

1 participant