Skip to content
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

Fix timeout in notebooks by making the app_url correctly point to app.rerun.io #5877

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions rerun_py/src/python_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ fn version() -> String {

/// Get a url to an instance of the web-viewer
///
/// This may point to rerun.io/viewer or localhost depending on
/// This may point to app.rerun.io or localhost depending on
/// whether [`start_web_viewer_server()`] was called.
#[pyfunction]
fn get_app_url() -> String {
Expand All @@ -1106,13 +1106,20 @@ fn get_app_url() -> String {
}

let build_info = re_build_info::build_info!();
if let Some(short_git_hash) = build_info.git_hash.get(..7) {
format!("https://rerun.io/viewer/commit/{short_git_hash}")

// Note that it is important to us `app.rerun.io` directly here. The version hosted
// at `rerun.io/viewer` is not designed to be embedded in a notebook and interferes
// with the startup sequencing. Do not switch to `rerun.io/viewer` without considering
// the implications.
if build_info.is_final() {
format!("https://app.rerun.io/version/{}", build_info.version)
} else if let Some(short_git_hash) = build_info.git_hash.get(..7) {
format!("https://app.rerun.io/commit/{short_git_hash}")
} else {
re_log::warn_once!(
"No valid git hash found in build info. Defaulting to rerun.io/viewer for app url."
"No valid git hash found in build info. Defaulting to app.rerun.io for app url."
);
"https://rerun.io/viewer".to_owned()
"https://app.rerun.io".to_owned()
jleibs marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand Down
Loading