-
Notifications
You must be signed in to change notification settings - Fork 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
.github: introduce interop tests #2835
Conversation
https://github.com/libp2p/rust-libp2p/runs/7949749580?check_suite_focus=true failed at the Go build stage. I am rerunning the test. |
@mxinden that won't work, we need to patch the go tests, I was planning on disabling the go tests temporarily (libp2p/test-plans#30) |
93e3bcb
to
a2a8c47
Compare
Here you go, tests have been fixed, please see the demo branches for results. |
@mxinden I'm worried this PR will go stale if we make a release and break the rust side of tests before we merge. is there anything I could do to help with reviewing/moving this forward? |
I've not been involved in these test plans so please tell me if my idea has already been considered: These inter-op tests seem like something that does not really belong into either repository (go / rust). I am also not sure whether running them on every PR is the most efficient way of dealing with inter-op problems. Having a failing build in one repository will take time from maintainers, even if them breaking was actually caused by the other repository. I have an alternative idea for how we could set this up and I am curious to hear your thoughts:
This decouples the actual inter-op tests from PRs on individual repositories. The differences to the current solution are:
An alternative to using |
From a resource perspective? Given that they can run on a single machine, I don't think we have to worry about resource usage.
If I understand correctly, with this patch, each rust-libp2p pull request would be tested against go-libp2p master. Is that correct @laurentsenta? I don't think that is a good idea. We can not expect the go-libp2p master branch to be clean at all times. Instead I would suggest testing each rust-libp2p pull request only against rust-libp2p master, rust-libp2p releases and go-libp2p releases, but not go-libp2p master. Would you agree @laurentsenta and @thomaseizinger?
I don't think I understand what the benefit of this approach would be. I would prefer knowing whether a PR breaks compatibility before it was merged. I would like to not have to monitor any CI systems, but instead be warned before merging a pull request due to CI failing. |
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.
Given that we are still in an early stage and thus will gain a lot from actually running these tests continuously, I am fine merging here and iterating on this in follow-up pull requests.
@laurentsenta I want to give @thomaseizinger a chance to reply. In case he doesn't have a strong opinion on blocking this, I will merge.
I think @mxinden's suggestion to test only against go-libp2p releases is exactly what's needed to address this concern.
As long as we're not resource constrained, I don't we should worry about this. What we're generating here is not noise - one might decide to disregard if they know the work is unfinished but that's OK.
That's why even if we didn't want to have the workflow run on every PR, I'd argue that simply changing the trigger to However, if we wanted to test master-master compatibility between the implementations, I think @thomaseizinger's idea would be perfect! All in all, in my opinion, as long as we can afford running the workflow on every PR, we should. |
Testing each merge into master would yield one run per pull request so we would be able to identify which PR broke something. Regarding knowing before the PR is merged: In general, I think it is good to catch as many problems as possible as early as possible. But there is also a cost to that. For example, it would be good to catch more bugs at compile time rather than at runtime with tests but sometimes, the former design is too complicated or simply undesirable. Similarly, I think there is merit in running different tests at different stages. Concretely, I think it makes sense to check things at PR merge time where we can say with high certainty that it is a bug in our software ( Having to manually monitor CI system is not good but it is a problem that can be solved with automation. For example, the workflow run could open an issue on every failed run and tag the maintainers of both repositories or whoever is deemed to be responsible.
My concern is not blocking so feel free to merge. |
I would expect these tests to reveal mostly rust-libp2p issues when run against go-libp2p releases only. If that is not the case I think we should reconsider your proposal. @laurentsenta would you mind doing the change to not run against go-libp2p master and accept the above suggestion by @galargh. I can then merge. |
If our quest is to have interoperability with Only testing against releases actually makes this situation even more complicated. You have to assume that people depend on the behaviour of software that has been released. Discovering inter-op problems after you've released a software is one step too late because it is much easier to say "well, people already depend on this behaviour now so all other implementations will have to follow". If we want to move towards spec-driven compliance, I think this PR may be a step in the wrong direction. Like I said above, my concern is not blocking but this step is worrying me a bit. |
But that's already the case right? with spec + conformance testing or not, if we release a broken behavior it's now a requirement for backward compatibility. Some context to make sure we're on the same page:
I get your point against releasing "broken" behaviors and turning them into de-facto specifications. And the worries against But that's the core of this PR:
|
I didn't know that, thanks for clarifying!
This makes sense yes. I guess if every implementation is running the interop tests on every PR against each other's releases, you shouldn't be able to break (tested) interop. Good to go from my end! |
For the record, not testing go-libp2p |
Co-authored-by: Piotr Galar <piotr.galar@gmail.com>
b6344bf
to
e99f203
Compare
Features merged, PR updated, and ready to get in. Don't hesitate to tag me or the team |
🎉 I am glad that this is happening. Thanks everyone, especially @laurentsenta. |
Description
Adds two workflows on push & PR:
run-ping-interop-cross-version
: runs a Testground interoperability test between multiple versions of rust-libp2p, including master, and the current branch (during a pull request)run-ping-interop-cross-implementation
: runs a Testground interoperability test between go-libp2p and rust-libp2p, including master, and the current branch (during a pull request)We rely on the https://github.com/libp2p/test-plans/ repository to retrieve and run the tests.
Demonstration:
Links to any relevant issues
Related PR in test-plans: libp2p/test-plans#26
Open Questions
Known issues:
Change checklist