Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix port race condition in distributed_test.FindMissing #6281

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vadimberezniker
Copy link
Member

@vadimberezniker vadimberezniker commented Mar 30, 2024

The issue affects only local runs. There's no guarantee that a port allocated by testport.FindFree() is still free by the time we try to listen on it and currently we silently swallow the listen error which leads to unpredictable results.

If you are happy with this approach, I will extend it to the other test cases as well.

Part of addressing https://github.com/buildbuddy-io/buildbuddy-internal/issues/3114

Related issues: N/A

The issue affects only local runs. There's no guarantee that a port
allocated by testport.FindFree() is still free by the time we try to
listen on it and currently we silently swallow it which leads to
unpredictable results.

If you are happy with this approach, I will extend it to the other test
cases as well.

Part of addressing buildbuddy-io/buildbuddy-internal#3114
Copy link
Member

@tylerwilliams tylerwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wdyt about making listener required?

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.

None yet

2 participants