From 216ca8c61dda2049247cc9efce2ad35693dabce4 Mon Sep 17 00:00:00 2001 From: Rami Chowdhury Date: Wed, 30 Aug 2023 20:07:11 -0400 Subject: [PATCH 1/2] mz: print `api.` prefix warning comment to stderr --- src/mz/src/context.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mz/src/context.rs b/src/mz/src/context.rs index e50658bb84d2a..f3ca127f3267d 100644 --- a/src/mz/src/context.rs +++ b/src/mz/src/context.rs @@ -111,11 +111,11 @@ impl Context { // Prints a warning comment about the cloud endpoint /// TODO: Remove after releasing version 0.1.6 and give anyone using `mz` time to apply the fix. pub fn print_warning_comment(&self) { - println!("⚠️ \t Warning\t ⚠️ \nStarting from version 0.1.3, it is a must to include the 'api.' subdomain in the cloud endpoint."); - println!("\nWrong: cloud-endpoint = \"https://staging.cloud.materialize.com\""); - println!("Right: cloud-endpoint = \"https://api.staging.cloud.materialize.com\""); - println!("\nPlease address this in your config before upcoming releases."); - println!("Config path: ~/.config/materialize/mz.toml.\n"); + eprintln!("⚠️ \t Warning\t ⚠️ \nStarting from version 0.1.3, it is a must to include the 'api.' subdomain in the cloud endpoint."); + eprintln!("\nWrong: cloud-endpoint = \"https://staging.cloud.materialize.com\""); + eprintln!("Right: cloud-endpoint = \"https://api.staging.cloud.materialize.com\""); + eprintln!("\nPlease address this in your config before upcoming releases."); + eprintln!("Config path: ~/.config/materialize/mz.toml.\n"); } /// Verifies the cloud endpoint is ok. From 2f0a3fe375ee0b1ca0fca5e13e5996693994209a Mon Sep 17 00:00:00 2001 From: Rami Chowdhury Date: Wed, 30 Aug 2023 21:15:29 -0400 Subject: [PATCH 2/2] mz: more diagnostics to stderr --- src/mz/src/command/sql.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mz/src/command/sql.rs b/src/mz/src/command/sql.rs index 0b721a665f96f..9376a9867aaf6 100644 --- a/src/mz/src/command/sql.rs +++ b/src/mz/src/command/sql.rs @@ -41,14 +41,14 @@ pub async fn run( let region_info = cx.get_region_info().await?; let email = claims.await?.email; - println!( + eprintln!( "Authenticated using profile '{}'.", cx.config_file().profile() ); if let Some(cluster) = cluster.clone() { - println!("Connected to cluster '{}'.", cluster); + eprintln!("Connected to cluster '{}'.", cluster); } else { - println!("Connected to the default cluster.") + eprintln!("Connected to the default cluster.") } let _error = sql_client