-
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
update quic-go to v0.38.1 #2506
Conversation
a52a809
to
59de8d3
Compare
@@ -178,7 +178,7 @@ func TestHashVerification(t *testing.T) { | |||
var trErr *quic.TransportError | |||
require.ErrorAs(t, err, &trErr) | |||
require.Equal(t, quic.TransportErrorCode(0x12a), trErr.ErrorCode) | |||
require.Contains(t, trErr.ErrorMessage, "cert hash not found") | |||
require.Contains(t, errors.Unwrap(trErr).Error(), "cert hash not found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That API seems a bit awkward. Maybe quic-go should expose an Error error
field on the TransportError
? Any thoughs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as we set the error
field on quic.TransportError
correctly, this seems fine. Any one who needs an exact check can do errors.Is(err, targetErr)
. Anyone who needs to check string contains can do strings.Contains(err.Error(), "error string")
We can also change this test to:
require.Contains(t, errors.Error(), "cert hash not found")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the problem, the error
field on TransportError
is only included in the Error() string if ErrorMessage
is empty.
Can we include both ErrorMessage
and error.Error()
in the final Error() string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle yes, but there's a lot going on in Error
already: https://github.com/quic-go/quic-go/blob/824fd8a2f2eb8a08fe6cef7a693fee6be3819e01/internal/qerr/errors.go#L33-L49
Suggestions welcome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we include both this way?
func (e *TransportError) Error() string {
str := fmt.Sprintf("%s (%s)", e.ErrorCode.String(), getRole(e.Remote))
if e.FrameType != 0 {
str += fmt.Sprintf(" (frame type: %#x)", e.FrameType)
}
var msg string
if len(e.ErrorMessage) > 0 {
msg += ": " + e.ErrorMessage
}
if e.error != nil {
msg += ": " + e.error.Error()
}
// if we have no message, use ErrorCodes Message
if msg == "" && len(e.ErrorCode.Message()) > 0 {
msg += ": " + e.ErrorCode.Message()
}
return str + msg
}
And then within quic-go code we try to ensure that ErrorMessage
and error
don't have redundant information. That way we don't have to break any API.
I don't like the option of just exporting error because then clients who want sub string match for errors will have to check both trErr.Error()
and trErr.Err.Error()
WebTransport interop is failing with rust-libp2p, but it's working with Chromium natively: The only WebTransport-related change is quic-go updating the code point for HTTP datagrams to the value used in the RFC (quic-go/quic-go#3588). The failure would make sense if rust-libp2p was using an outdated version. @mxinden, any idea? |
rust-libp2p seems to be using Chrome 112. Might that be the issue? |
112 seems pretty recent, it's from April. Wouldn't expect that to be the problem, although I haven't tried it yet. I'm a bit confused by the log output. Are the tests running in parallel and not synchronizing their log output?
The relevant line seems to be the following:
Can you make sense of this? |
Triggered once more to see whether this is an intermittent failure. https://github.com/libp2p/go-libp2p/actions/runs/5922005874/job/16061429456 |
As far as I can tell, they do run in parallel: I don't think stdout nor stderr is synchronized across those test executions. |
We should probably fix that at some point. For reference, I had to deal with a very similar problem in the quic-go cross compilation workflow recently: quic-go/quic-go#3809 |
Same failure. I already reran it a few times before. This is an actual failure. |
Documenting my suspicions thus far:
I am assuming this is the chromium driver failing to bind to its port:
What this suspicion can not explain is, why this is failing on this and only this pull request. Also why would the port be taken? There aren't multiple rust-libp2p WASM tests spawned here. |
I'm not really familiar with the Chromium driver, but I have a similar Chrome interop test in webtransport-go, and it looks like it doesn't (explicitly?) need to bind to any port: https://github.com/quic-go/webtransport-go/blob/master/interop/interop.py#L28-L32. Not sure if that helps? |
The port may be a red herring as a successful run emits this:
|
I've successfully run the test by updating to chrome 115.
I think the issue then is that rust-libp2p v0.52 is using an older version of chrome. @mxinden let's update this As a note, js-libp2p uses playwright which always downloads the latest version of the browsers we are testing against. This kind of goes against my own view of reproducibility, but it is convenient. I haven't spent the effort to figure out how to prevent playwright from doing this, and it's a bit harder since it's 2 layers down the abstraction stack (aegier -> playwright-test -> playwright). |
Thanks for digging into this @MarcoPolo! @mxinden Could you update this in rust-libp2p asap? The v0.31 release is scheduled for Monday next week, and we'd like to get this quic-go update in (to ship GSO support). If that timeline doesn't work out, we'll have to disable the interop test to be able to move forward here. |
👍 thanks @MarcoPolo.
Got it. I will do the update either today or tomorrow. |
Our WASM Webtransport interoperability tests previously used Chrome 112. This Chrome version fails to connect to go-libp2p with quic-go v0.38.0. See libp2p/go-libp2p#2506 for failure. This is due to quic-go v0.38.0 moving to the updated code point for HTTP datagrams. See quic-go/quic-go#3588 for details. This commit upgrades our interop tests to use Chrome 115.
Our WASM Webtransport interoperability tests previously used Chrome 112. This Chrome version fails to connect to go-libp2p with quic-go v0.38.0. See libp2p/go-libp2p#2506 for failure. This is due to quic-go v0.38.0 moving to the updated code point for HTTP datagrams. See quic-go/quic-go#3588 for details. This commit upgrades our interop tests to use Chrome 115. Pull-Request: #4383.
Bump rust-libp2p v0.52 interop version to include libp2p/rust-libp2p#4383 which fixes issue in libp2p/go-libp2p#2506.
Bump rust-libp2p v0.52 interop version to include libp2p/rust-libp2p#4383 which fixes issue in libp2p/go-libp2p#2506.
libp2p/test-plans#273 is merged. Latest run succeeded. https://github.com/libp2p/go-libp2p/actions/runs/5922005874/job/16169252860 |
Updated quic-go to v0.38.1. |
No description provided.