-
Notifications
You must be signed in to change notification settings - Fork 957
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
chore(webtransport): Add interop-tests support with wasm #4063
Conversation
Uses `web-sys::WebTransport` and provides a `Transport` implementation.
This comment was marked as resolved.
This comment was marked as resolved.
47baa5f
to
8c26133
Compare
I've retargeted this to a copy of the original PR that now lives on a branch in this repository so we can stack the PRs on top of each other. |
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.
Thank you for this! Very high quality!
I made a few comments. Overall, I think it will be better to stick to one binary and have a conditionally-compiled run_test
function.
It will be with the next release, nothing to be done here for now.
We will have to make a copy of that and modify our CI to also build the 2nd docker image and run the tests for that. We can simply append more steps to this job here: rust-libp2p/.github/workflows/interop-test.yml Lines 19 to 27 in 2910c98
I'd suggest sticking to the same "native" vs "wasm" naming. |
Overall, my suggestion would be that we iterate on the tests in here and once we are happy, we merge them into #4065 and then merge the implementation plus test together into master as a single PR. |
I am not quite sure why CI isn't running but I think it should run as soon as you push a new commit. |
8c26133
to
5e1149a
Compare
5e1149a
to
05bf0d3
Compare
This pull request has merge conflicts. Could you please resolve them @zvolin? 🙏 |
@zvolin Would you mind opening a PR against https://github.com/oblique/rust-libp2p/tree/webtransport-wasm-ext instead? Then we can merge this PR into that branch once we have a passing interop-test. @oblique Can you please enable GitHub actions on your fork? |
Also, I'd prefer if you didn't force-push commits. It doesn't play well with GitHub's review system and we squash-merge anyway in here, thanks :) |
As agreed I've opened the PR vs @oblique branch, however I'd like to first resolve all the things there to not cut off the discussion 👍 |
Sounds good to me, I should have time for another review pass today! |
@thomaseizinger Do you use self hosted runners for this repo? In my fork we are getting failure on webrtc interop tests and I was wondering if a self hosted runner is the solution to it. Can you run the CI for this PR once? This is the error:
|
a31c792
to
0eeb124
Compare
I debugged this case locally and it seems that we have to start listener even if the node is a dialing one. Hidden it behind the |
We do but they are simply more powerful machines on AWS without any specific configuration.
CI doesn't currently run because there are merge conflicts and we use
Does my suggestion here help? Also note that the error is for the WebRTC transport, not the newly added WebTransport so it should be unrelated. |
interop-tests/src/lib.rs
Outdated
tokio::spawn(async move { | ||
loop { | ||
swarm.next().await; | ||
} | ||
}); | ||
tokio::time::sleep(test_timeout).await; |
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.
Additionally, we'd have to move the Swarm::listen_on
into the match
arm where is_dialer
is false
.
@thomaseizinger So with 0eeb124 the native interop tests are working. |
we could also have a superjob that depends on the 2 jobs if you want to have a single required job |
Co-authored-by: Yiannis Marangos yiannis@eiger.co
Yeah agreed, happy to go back to two jobs. Probably better anyway because otherwise it is going to be a super long CI job. |
seems stuck 🤔 |
They are not, see https://github.com/libp2p/rust-libp2p/actions/runs/5267580644. But using a matrix changes the name of the job so we will have to adjust that before merging it. GitHub is listing it because it is a required check. |
Thanks for the review 👍 |
I've got two more follow-up commits so I am gonna quickly re-open to push those :) |
Description
Add interop tests for webtransport backend. The test is built as a wasm package and executed in headless chrome instance using webdriver.
Related #4015.
Notes & open questions
I've tested this both locally and from within the docker image versus the go-libp2p ping implementation.This still needs to be picked up in https://github.com/libp2p/test-plans/blob/master/multidim-interop/versions.tsI'm not sure how should I modify theping-version.json
file.Change checklist