-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[zombinet] initial implementation of zombienet backchannel #4377
Conversation
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.
See inline comments
Hi @drahnr, I updated the implementation follow the pattern from our last talk. Now you have an
Let me know if you want to change/refactor something. Examples of usage could be:
let backchannel = ZombienetBackchannel::init().await.expect("Error connecting ws");
let mut rx = backchannel.subscribe();
while let Ok(backchannel_item) = rx.recv().await {
println!("{:?}", backchannel_item);
}
let backchannel = ZombienetBackchannel::init().await.expect("Error connecting ws");
backchannel.send(<key>, <value>) Ping @Lldenaurois, let me know if you want to chat about test cases 0002/0003 for malus integration. Thanks!! |
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.
LGTM besides the lack of documentation :)
Co-authored-by: Bernhard Schuster <[email protected]>
Thanks for the feedback @drahnr, I added some |
Could you merge master, so we can merge this :) |
Hi @drahnr, merged :) but now the |
Please merge master again |
Done 👍, thanks! |
Hi @drahnr, thanks for the feedback. I already made those changes 👍 |
Hi @drahnr / @Lldenaurois,
This is the initial implementation of the backchannel for
zombienet
, targeting #4272.The general idea is that there is a server side running in zombienet environment that has an
http
and aws
listeners,http
interface acceptpost
request to store new items that should be available for use by thetest-runner
.ws
interfacebroadcasted
those new items to all connected malus actors.Notes:
env
vars are defaulted to the ones we need to use in ourCI
, since we can resolvebackchannel
to the correct endpoint.connect
fn create thews
connection and return thereceiver
part in theinner
field.malus
crate in order to test the complete flow locally or in theCI
.scale
encode if correct because in the zombienet side is stored asstring
.test
mocking thezombienet
server should be implemented after complete the integration.Thanks!