Skip to content

Fix registry race test compilation#2040

Open
27rohan wants to merge 1 commit into
Altinity:0.27.2from
27rohan:fix/registry-race-test
Open

Fix registry race test compilation#2040
27rohan wants to merge 1 commit into
Altinity:0.27.2from
27rohan:fix/registry-race-test

Conversation

@27rohan

@27rohan 27rohan commented Jul 17, 2026

Copy link
Copy Markdown

Summary

Test_Registry_BasicOperations_ConcurrencyTest checks if the Registry is safe to use from multiple threads at once. The test had gotten out of date with the code, so it wouldn't even compile — meaning it silently never ran. This PR updates the test to match the current code so the safety check actually works again. No behavior changes to the operator itself.

Mechanism

Fixes the race-only Registry test, which didn't compile under -race (so its concurrency coverage never ran), by updating it to the current metav1.Object-based API — no production behavior changes.

  • update the race-only Registry test to pass pointers implementing metav1.Object
  • update Walk callbacks to match the current metav1.Object API
  • keep production Registry behavior unchanged

The test currently fails to compile with -race, so its concurrency coverage never runs.

Test plan

  • go test -mod=readonly -race -count=1 ./pkg/model

Update the race-only test to use the current metav1.Object-based Registry API.

Signed-off-by: Rohan Thakkar <rohant@twitter.com>
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