diff --git a/nym-node-status-api/nym-node-status-agent/src/cli/run_ports_check.rs b/nym-node-status-api/nym-node-status-agent/src/cli/run_ports_check.rs index 3fa6b2f2bf..c4bc641b6f 100644 --- a/nym-node-status-api/nym-node-status-agent/src/cli/run_ports_check.rs +++ b/nym-node-status-api/nym-node-status-agent/src/cli/run_ports_check.rs @@ -55,14 +55,15 @@ pub(crate) async fn run_ports_check( let credentials_args = common::credential_args_from(testrun.ticket_materials); log_capture.start(); - let port_check_result = nym_gateway_probe::Probe::run_ports_for_agent( + let port_check_result_res = nym_gateway_probe::Probe::run_ports_for_agent( gateway_identity_pubkey, network, &run_ports_config, credentials_args, ) - .await?; + .await; let probe_log = log_capture.stop_and_drain(); + let port_check_result = port_check_result_res?; submit_ports_check_results_to_servers( servers, diff --git a/nym-node-status-api/nym-node-status-agent/src/cli/run_probe.rs b/nym-node-status-api/nym-node-status-agent/src/cli/run_probe.rs index 6e4da33cab..2e5aca47cd 100644 --- a/nym-node-status-api/nym-node-status-agent/src/cli/run_probe.rs +++ b/nym-node-status-api/nym-node-status-agent/src/cli/run_probe.rs @@ -48,8 +48,9 @@ pub(crate) async fn run_probe( // Run the probe, capturing all tracing output log_capture.start(); - let probe_result = Box::pin(probe.probe_run_agent(credentials_args)).await?; + let probe_result_res = Box::pin(probe.probe_run_agent(credentials_args)).await; let probe_log = log_capture.stop_and_drain(); + let probe_result = probe_result_res?; // Inspect the probe output for socks5 field match probe_result.outcome.socks5.as_ref() { diff --git a/nym-node-status-api/nym-node-status-api/migrations_pg/20260415000000_gateways_ports_check.sql b/nym-node-status-api/nym-node-status-api/migrations_pg/20260415000000_gateways_ports_check.sql index e521cb2aa5..f506b093f5 100644 --- a/nym-node-status-api/nym-node-status-api/migrations_pg/20260415000000_gateways_ports_check.sql +++ b/nym-node-status-api/nym-node-status-api/migrations_pg/20260415000000_gateways_ports_check.sql @@ -4,6 +4,7 @@ UPDATE gateways SET ports_check = (last_probe_result::jsonb -> 'ports_check') WHERE last_probe_result IS NOT NULL AND btrim(last_probe_result) <> '' + AND last_probe_result ~ '^[\[{]' AND last_probe_result::jsonb ? 'ports_check' AND ports_check IS NULL; @@ -11,4 +12,5 @@ UPDATE gateways SET last_probe_result = (last_probe_result::jsonb - 'ports_check')::text WHERE last_probe_result IS NOT NULL AND btrim(last_probe_result) <> '' + AND last_probe_result ~ '^[\[{]' AND last_probe_result::jsonb ? 'ports_check'; \ No newline at end of file diff --git a/nym-node-status-api/nym-node-status-api/src/cli/mod.rs b/nym-node-status-api/nym-node-status-api/src/cli/mod.rs index 29b5b30657..18bc84f48b 100644 --- a/nym-node-status-api/nym-node-status-api/src/cli/mod.rs +++ b/nym-node-status-api/nym-node-status-api/src/cli/mod.rs @@ -82,7 +82,7 @@ pub(crate) struct Cli { #[arg(value_parser = parse_duration_std)] pub(crate) testruns_refresh_interval: Duration, - /// 2 hour safety net for test runs which include a port check + /// Safety net for stale in-progress testruns (whole seconds, es. 7200). #[clap( long, default_value = "7200", diff --git a/nym-node-status-api/nym-node-status-client/src/lib.rs b/nym-node-status-api/nym-node-status-client/src/lib.rs index 73de44b361..27aac8b538 100644 --- a/nym-node-status-api/nym-node-status-client/src/lib.rs +++ b/nym-node-status-api/nym-node-status-client/src/lib.rs @@ -69,8 +69,12 @@ impl NsApiClient { } serde_json::from_str(&response_text) - .map(|testrun| { - tracing::info!("Received testrun assignment: {:?}", testrun); + .map(|testrun: TestrunAssignmentWithTickets| { + tracing::info!( + testrun_id = testrun.assignment.testrun_id, + gateway = %testrun.assignment.gateway_identity_key, + "Received testrun assignment", + ); testrun }) .map_err(|err| { @@ -115,8 +119,12 @@ impl NsApiClient { } serde_json::from_str(&response_text) - .map(|testrun| { - tracing::info!("Received ports-check testrun assignment: {:?}", testrun); + .map(|testrun: TestrunAssignmentWithTickets| { + tracing::info!( + testrun_id = testrun.assignment.testrun_id, + gateway = %testrun.assignment.gateway_identity_key, + "Received ports-check testrun assignment", + ); testrun }) .map_err(|err| {