-
Notifications
You must be signed in to change notification settings - Fork 451
blueprint make_active
doesn't work with the web viewer
#8741
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
Comments
Signed-off-by: DerpDays <[email protected]>
Signed-off-by: DerpDays <[email protected]>
I ran into a similar issue when working in rust creating my own web socket server based off For this issue, the following code snippets are the issue: rerun/crates/store/re_ws_comms/src/server.rs Lines 381 to 387 in a9fbe2e
In this, the blueprint activation command is saved as static in the history whereas since actual blueprints are just of type ArrowMsg, they are saved as a normal log in the history. This means that further down: rerun/crates/store/re_ws_comms/src/server.rs Lines 417 to 429 in a9fbe2e
When a new client connects, static messages are sent first, and hence it tries to activate a blueprint that it doesn't yet have access to since the blueprint data is saved in the normal history. A quick fix would be to log normal data before the static data, or to log actual blueprints as static with something like: match data {
LogMsg::ArrowMsg(store_id, _) if store_id.kind != StoreKind::Blueprint => {
inner.history.push(msg);
}
_ => inner.history.push_static(msg),
}; Though in either case there are tradeoffs - should blueprints be static and exempt from gc (then someone swapping lots of blueprints may build up lots of static data), or if they are able to be gc'ed, then a blueprint may be cleaned up when it might be needed for a new client later. In my opinion, out of the two options, blueprints should be static, which is what I've included in my PR, though there definitely is some way where we only keep the last blueprint set as default as static - though this would be added complexity. |
### Related * Closes #8741 ### What Makes blueprint contents be saved internally as static (along with their activation command), instead of as a normal message. This fixes the issue with default blueprints not being activated on web clients when a new user connects, since after this change blueprint data is also saved as static, this means the blueprint data is now sent to the client before the activation command (since the activation command is read and sent to the sink after the blueprint data). More info can be found in the related issue [#8741](#8741 (comment)). Edit: just seen that there is plans to move away from websockets to gRPC so this will probably be irrelevant soon. Signed-off-by: DerpDays <[email protected]>
Blueprints sent via
send_blueprint
arrive just fine but they're not made active, even whenShort repro:
The viewer evidently received the blueprint and made it the default (
send_column
by makes the blueprint the default and makes it active) but it doesn't switch to this blueprint unless prompted to do so from the ui.This does not happen when spawning the native viewer (
spawn=True
on init).Curiously, when using
rr.init("image_viewer", default_blueprint=blueprint)
, the blueprint is set as default and visible!See also https://discord.com/channels/1062300748202921994/1330599362774171768/1330599362774171768
The text was updated successfully, but these errors were encountered: