-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
move go-libp2p-autonat to p2p/host/autonat #1273
Conversation
fix bug introduced in last commit
connection state can be determined through the network interface on demand
addresses service TODO
remove context from constructor, implement a proper Close method
clean up dialer peerstore after each dial
e709b49
to
08500f1
Compare
do it! |
Looks like tests are flaky. Let's fix in the autonat repo and then move it here. |
The problem is not that the test are flaky on their own - they're only flaky because |
sounds plausible; any wsy to put constraints on what runs in parallel? |
I do think we can blame at least one test for being flaky. At least it's flaky when it runs in parallel to itself, even under separate binaries and processes. Enter the new ./p2p/host/autonat package, or the old root package, with Go 1.17.5, and run:
In both the old and new repos, I get a failure rate of just under 5%. Low enough that the flake probably didn't cause issues in the smaller module, perhaps.
I'm not sure if the test is simply flakey by design, or if it starts to flake when run in parallel with other tests in other processes - perhaps it's using the network in some way that clashes globally, such as listening on ports or sending broadcast messages. In any case, I don't think we can blame |
I should have mentioned that the tool in question is https://pkg.go.dev/golang.org/x/tools/cmd/stress. It's just a small tool to run many parallel invocations of a command, and find failures. One of its main intended use cases is to uncover flakes. If you struggle to reproduce, note that you can give extra flags to |
@mvdan Thank you for helping debug this. I will update this PR once this fix has been merged. |
08500f1
to
aece2b7
Compare
aece2b7
to
7465d8d
Compare
7465d8d
to
741348e
Compare
There's no reason autonat should live in a separate repo.
This is also a prerequisite for moving the swarm into this repo, as autonat depends on go-libp2p-swarm/testing.