libp2p / go-reuseport

reuse tcp/udp ports in golang
ISC License
766 stars 108 forks source link

Create Jenkinsfile #45

Closed victorb closed 5 years ago

victorb commented 6 years ago

Saw https://github.com/libp2p/go-reuseport/pull/44 so thought this was handy.

Results: https://ci.ipfs.team/blue/organizations/jenkins/libp2p%2Fgo-reuseport/detail/jenkinsfile/1/tests

Stebalien commented 6 years ago

Any idea why the tests are showing up as failing?

victorb commented 6 years ago

Not sure go-reuseport has been tested on windows before, but there is bunch of these:

reuse_test.go:347: tcp6 [::]:58533 [::]:58532 dial tcp6 [::]:58533->[::]:58532: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

For most test cases.

Failed linux test shows this:

reuse_test.go:347: tcp 127.0.0.1:35608 127.0.0.1:42882 cannot assign requested address
Stebalien commented 6 years ago

Not sure go-reuseport has been tested on windows before, but there is bunch of these:

Interesting. The way we use reuseport on windows doesn't actually rely on listening multiple times on the same port (just dialing from a port we're listening on). However, that test tries listening. multiple times on the same port...

Failed linux test shows this:

We get things like that randomly on travis as well. May want to retry somewhere.

Kubuxu commented 6 years ago

The way we use reuseport on windows doesn't actually rely on listening multiple times on the same port (just dialing from a port we're listening on).

That is the other primary use of SO_REUSEPORT and why it was created (to spread the load of Listen (2) among many threads).

Stebalien commented 6 years ago

@Kubuxu I know, it's just not the primary use of this library (although we should still support it).

anacrolix commented 5 years ago

This could be merged after #56, which removes the flaky tests. Travis has added support for windows, but I don't think it will work out of the box, so this might be preferred or suffice in the meanwhile.

anacrolix commented 5 years ago

How do I require Go 1.11? It's using 1.10.2.

magik6k commented 5 years ago

You need to open a PR to https://github.com/ipfs/jenkins-libs/blob/master/vars/golang.groovy#L27

anacrolix commented 5 years ago

See https://github.com/ipfs/jenkins-libs/pull/48.

magik6k commented 5 years ago

https://github.com/ipfs/jenkins-libs/pull/48 has been merged

anacrolix commented 5 years ago

Thanks @magik6k.

anacrolix commented 5 years ago

This appears to be working. https://ci.ipfs.team/blue/organizations/jenkins/libp2p%2Fgo-reuseport/detail/PR-45/8/pipeline