Skip to content

Conversation

aditighag
Copy link
Member

When the heartbeat timeout is set to a low value (e.g., in tests), there's a risk that the goroutine responsible for sending heartbeat probes may not start before the timeout expires. To address this, introduce a channel to synchronize goroutine startup.

A WaitGroup could also be used, but it risks blocking the controller indefinitely if the goroutine fails to start or blocks on I/O.

Fixes: #39428

@aditighag aditighag requested a review from a team as a code owner May 8, 2025 21:05
@aditighag aditighag requested a review from marseel May 8, 2025 21:05
@aditighag aditighag added the release-note/misc This PR makes changes that have no direct user impact. label May 8, 2025
@aditighag
Copy link
Member Author

/test

@aditighag aditighag marked this pull request as draft May 8, 2025 21:40
@aditighag aditighag force-pushed the pr/aditighag/fix-clientset-heartbeat-flake branch from 389079f to 2b57a06 Compare May 8, 2025 21:52
@aditighag
Copy link
Member Author

/test

@aditighag aditighag marked this pull request as ready for review May 8, 2025 21:52
@aditighag aditighag marked this pull request as draft May 9, 2025 14:52
@aditighag aditighag force-pushed the pr/aditighag/fix-clientset-heartbeat-flake branch from 2b57a06 to 8f6fc4b Compare May 9, 2025 17:37
@aditighag
Copy link
Member Author

/test

@aditighag
Copy link
Member Author

Ran all the tests in the file 100 times locally without any issue.

@aditighag aditighag marked this pull request as ready for review May 9, 2025 17:50
@marseel
Copy link
Contributor

marseel commented May 12, 2025

Ran all the tests in the file 100 times locally without any issue.

FYI, I've ran your patch with that sleep(10s) in the test and it also failed.

@aditighag aditighag force-pushed the pr/aditighag/fix-clientset-heartbeat-flake branch from 8f6fc4b to 4e1b907 Compare May 12, 2025 16:06
@aditighag
Copy link
Member Author

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 13, 2025
@joestringer joestringer added dont-merge/discussion A discussion is ongoing and should be resolved before merging, regardless of reviews & tests status. and removed ready-to-merge This PR has passed all tests and received consensus from code owners to merge. labels May 13, 2025
@joestringer
Copy link
Member

Added the dont-merge/discussion label due to the ongoing discussion. Feel free to drop the label once that is resolved.

The test cases exercise timing aspects so
set a higher limit to avoid spurious failures. This
fixes the flakes seen in CI.

Suggested-by: Marcel Zieba <marcel.zieba@isovalent.com>
Signed-off-by: Aditi Ghag <aditi@cilium.io>
@aditighag aditighag force-pushed the pr/aditighag/fix-clientset-heartbeat-flake branch from 4e1b907 to cf23fed Compare May 15, 2025 14:39
@aditighag
Copy link
Member Author

/test

@aditighag aditighag removed the dont-merge/discussion A discussion is ongoing and should be resolved before merging, regardless of reviews & tests status. label May 15, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 15, 2025
@aditighag aditighag added this pull request to the merge queue May 15, 2025
Merged via the queue into cilium:main with commit f7dfd41 May 15, 2025
66 checks passed
@aditighag aditighag deleted the pr/aditighag/fix-clientset-heartbeat-flake branch May 15, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: Test_clientMultipleAPIServers failure
3 participants