-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[zombinet] initial implementation of zombienet backchannel #4377
Conversation
drahnr
left a comment
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!! |
drahnr
left a comment
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
httpand awslisteners,httpinterface acceptpostrequest to store new items that should be available for use by thetest-runner.wsinterfacebroadcastedthose new items to all connected malus actors.Notes:
envvars are defaulted to the ones we need to use in ourCI, since we can resolvebackchannelto the correct endpoint.connectfn create thewsconnection and return thereceiverpart in theinnerfield.maluscrate in order to test the complete flow locally or in theCI.scaleencode if correct because in the zombienet side is stored asstring.testmocking thezombienetserver should be implemented after complete the integration.Thanks!