Skip to content

Commit 7dc4bc9

Browse files
authored
chore(system-tests-k8s): console logs url (dfinity#3606)
Log URL to navigate to node console logs.
1 parent 98c8e43 commit 7dc4bc9

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

rs/tests/driver/src/driver/bootstrap.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use crate::driver::{
1717
},
1818
test_setup::InfraProvider,
1919
};
20+
use crate::k8s::config::LOGS_URL;
2021
use crate::k8s::tnet::{TNet, TNode};
2122
use crate::util::block_on;
2223
use anyhow::{bail, Result};
@@ -292,6 +293,14 @@ pub fn setup_and_start_vms(
292293
)
293294
.expect("deploying config image failed");
294295
block_on(tnet_node.start()).expect("starting vm failed");
296+
let node_name = tnet_node.name.unwrap();
297+
info!(t_farm.logger, "starting k8s vm: {}", node_name);
298+
info!(
299+
t_farm.logger,
300+
"vm {} console logs: {}",
301+
node_name.clone(),
302+
LOGS_URL.replace("{job}", &node_name)
303+
);
295304
}
296305
InfraProvider::Farm => {
297306
let image_spec = AttachImageSpec::new(upload_config_disk_image(

rs/tests/driver/src/k8s/config.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ pub static TNET_CONFIG_URL: Lazy<String> = Lazy::new(|| {
1515
pub static TNET_DNS_SUFFIX: Lazy<String> =
1616
Lazy::new(|| var("TNET_DNS_SUFFIX").unwrap_or("tnets.ln1-idx1.dfinity.network".to_string()));
1717

18+
pub static LOGS_URL: Lazy<String> = Lazy::new(|| {
19+
var("TNET_LOGS_URL").unwrap_or("https://grafana.ln1-idx1.dfinity.network/explore?schemaVersion=1&panes=%7B%22z2x%22:%7B%22datasource%22:%22P8E80F9AEF21F6940%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bnamespace%3D%5C%22tnets%5C%22,%20container%3D%5C%22guest-console-log%5C%22,%20job%3D%5C%22tnets%2F{job}%5C%22%7D%20%7C%3D%20%60%60%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22P8E80F9AEF21F6940%22%7D,%22editorMode%22:%22builder%22%7D%5D,%22range%22:%7B%22from%22:%22now-2h%22,%22to%22:%22now%22%7D%7D%7D&orgId=1".to_string())
20+
});
21+
1822
pub static TNET_BUCKET: Lazy<String> = Lazy::new(|| {
1923
var("TNET_BUCKET").unwrap_or("tnet-config-8edb8de3-6057-49e4-9fdb-66a29ee9aeda".to_string())
2024
});

0 commit comments

Comments
 (0)