Skip to content

[v17] Fix data race in kube proxy watcher tests#62206

Merged
tigrato merged 1 commit intobranch/v17from
tigrato/fixdataracev17
Dec 18, 2025
Merged

[v17] Fix data race in kube proxy watcher tests#62206
tigrato merged 1 commit intobranch/v17from
tigrato/fixdataracev17

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Dec 12, 2025

Backport #62167 to branch/v17

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
@tigrato tigrato enabled auto-merge December 12, 2025 17:50
@github-actions github-actions bot requested review from rosstimothy and zmb3 December 12, 2025 17:50
@tigrato tigrato added this pull request to the merge queue Dec 15, 2025
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from zmb3 December 15, 2025 10:55
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 15, 2025
@tigrato tigrato added this pull request to the merge queue Dec 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 16, 2025
@tigrato tigrato added this pull request to the merge queue Dec 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 18, 2025
@tigrato tigrato added this pull request to the merge queue Dec 18, 2025
Merged via the queue into branch/v17 with commit 8711a74 Dec 18, 2025
41 checks passed
@tigrato tigrato deleted the tigrato/fixdataracev17 branch December 18, 2025 17:50
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