[RayService] Fix broken build: use events.NewFakeRecorder in unit test - #5087
Open
KunWuLuan wants to merge 1 commit into
Open
[RayService] Fix broken build: use events.NewFakeRecorder in unit test#5087KunWuLuan wants to merge 1 commit into
KunWuLuan wants to merge 1 commit into
Conversation
rayservice_controller_unit_test.go:2637 called record.NewFakeRecorder, but the file no longer imports k8s.io/client-go/tools/record (it was migrated to k8s.io/client-go/tools/events). This is a semantic merge conflict between the events migration and ray-project#4894, leaving master non-compiling (undefined: record). Switch to events.NewFakeRecorder(10), matching every other recorder in the file.
KunWuLuan
requested review from
MortalHappiness,
andrewsykim,
kevin85421 and
rueian
as code owners
August 5, 2026 06:42
Collaborator
|
I think this is duplicated with #5084 |
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.
Why
mastercurrently does not compile.golangci-lint(pre-commit) fails on every open PR with:Root cause
A semantic merge conflict between two independently-green PRs:
k8s.io/client-go/tools/recordtok8s.io/client-go/tools/events; every recorder in it now usesevents.NewFakeRecorder(...)/events.FakeRecorder{}, andtools/recordis no longer imported.record.NewFakeRecorder(10)at line 2637, written against a base that still importedtools/record.Merged together,
recordis undefined, so the test package fails to typecheck. Each PR passed CI on its own base; the combination onmasterdoes not compile.Fix
Switch the single stray call to
events.NewFakeRecorder(10), matching every other recorder in the file (e.g. lines 476, 909). One line, no import changes.Verification