block-network does not allow binding to localhost on Mac #14828
Labels
help wanted
Someone outside the Bazel team could own this
P2
We'll consider working on this in future. (Assignee optional)
team-Local-Exec
Issues and PRs for the Execution (Local) team
type: bug
Description of the problem / feature request:
On a Mac, unit tests that listen to localhost fail when "block-network" tag is used.
On our CI (Linux), those unit tests pass.
The expectation is that binding to localhost should work when "block-network" tag is used.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Create a unit test that binds to localhost with Java. We have the same symptoms for OkHttp MockWebServer and Dropwizard's Integration test framework. They both work fine on CI (Linux) when block-network is activated, but fail on Mac. They work anywhere when block-network is deactivated.
Edit: this is a minimal project that can be used to reproduce the issue https://github.com/ngeor/bazel-block-network
What operating system are you running Bazel on?
MacOS Monterey 12.2.1
What's the output of
bazel info release
?5.0.0
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?Not an open source project.
Have you found anything relevant by searching the web?
I have found an old GitHub issue that is resolved #10305
This commit indicates this was a problem in the past fe7b4ef
Any other information, logs, or outputs that you want to share?
This is an example stacktrace from the Mac:
The text was updated successfully, but these errors were encountered: