Skip to content

[v18] Fix data race in kube proxy watcher tests#62205

Merged
tigrato merged 1 commit intobranch/v18from
bot/backport-62167-branch/v18
Dec 12, 2025
Merged

[v18] Fix data race in kube proxy watcher tests#62205
tigrato merged 1 commit intobranch/v18from
bot/backport-62167-branch/v18

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Dec 12, 2025

Backport #62167 to branch/v18

This fixes a data race in the kube proxy watcher tests where the
AuthClient field of mockAuthClient was being accessed concurrently
without synchronization.

The issue was introduced in #61642 where the AuthClient was being
set after the test context setup, creating a race condition between
the server initialization and the test setup.

This commit resolves the race by using the WrapAuthClient hook in
TestConfig to properly inject the mock client during setup, ensuring
the AuthClient is set before any concurrent access can occur.

Fixes #62166

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@tigrato tigrato added the no-changelog Indicates that a PR does not require a changelog entry label Dec 12, 2025
@github-actions github-actions bot requested review from rosstimothy and zmb3 December 12, 2025 17:43
@tigrato tigrato enabled auto-merge December 12, 2025 17:50
@tigrato tigrato added this pull request to the merge queue Dec 12, 2025
Merged via the queue into branch/v18 with commit a9d901a Dec 12, 2025
42 checks passed
@tigrato tigrato deleted the bot/backport-62167-branch/v18 branch December 12, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport kubernetes-access no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants