From d2dd3909c39d1cf6f5617bfe69a76007e013e506 Mon Sep 17 00:00:00 2001 From: Nico Hinderling Date: Fri, 12 Jun 2026 07:44:10 -0700 Subject: [PATCH] ref: Remove experimental flag from snapshots and build commands The snapshots commands (upload, download, diff) and the build download command were marked experimental, printing a warning to stderr on every run and prefixing their help text with [EXPERIMENTAL]. These commands are now stable, so remove the warnings and the experimental help markers. Update the affected trycmd help fixtures accordingly. --- src/commands/build/download.rs | 11 ++--------- src/commands/snapshots/diff.rs | 13 ++----------- src/commands/snapshots/download.rs | 15 ++++----------- src/commands/snapshots/mod.rs | 2 +- src/commands/snapshots/upload.rs | 11 ++--------- .../_cases/build/build-download-help.trycmd | 3 --- tests/integration/_cases/build/build-help.trycmd | 2 +- tests/integration/_cases/help/help-windows.trycmd | 2 +- tests/integration/_cases/help/help.trycmd | 2 +- .../_cases/snapshots/snapshots-diff-help.trycmd | 3 --- .../snapshots/snapshots-download-help.trycmd | 3 --- .../_cases/snapshots/snapshots-upload-help.trycmd | 3 --- 12 files changed, 14 insertions(+), 56 deletions(-) diff --git a/src/commands/build/download.rs b/src/commands/build/download.rs index a637d69426..90cb87e979 100644 --- a/src/commands/build/download.rs +++ b/src/commands/build/download.rs @@ -10,16 +10,10 @@ use crate::config::Config; use crate::utils::args::ArgExt as _; use crate::utils::fs::TempFile; -const EXPERIMENTAL_WARNING: &str = - "[EXPERIMENTAL] The \"build download\" command is experimental. \ - The command is subject to breaking changes, including removal, in any Sentry CLI release."; - pub fn make_command(command: Command) -> Command { command - .about("[EXPERIMENTAL] Download a build artifact.") - .long_about(format!( - "Download a build artifact.\n\n{EXPERIMENTAL_WARNING}" - )) + .about("Download a build artifact.") + .long_about("Download a build artifact.") .org_arg() .arg( Arg::new("build_id") @@ -53,7 +47,6 @@ fn extension_from_url(url: &str) -> Result<&str> { } pub fn execute(matches: &ArgMatches) -> Result<()> { - eprintln!("{EXPERIMENTAL_WARNING}"); let config = Config::current(); let org = config.get_org(matches)?; let build_id = matches diff --git a/src/commands/snapshots/diff.rs b/src/commands/snapshots/diff.rs index bd7f67b1fa..7b697a7bd5 100644 --- a/src/commands/snapshots/diff.rs +++ b/src/commands/snapshots/diff.rs @@ -11,10 +11,6 @@ use crate::utils::fs::{path_as_url, IMAGE_EXTENSIONS}; use crate::utils::odiff::binary::ensure_binary; use crate::utils::odiff::server::{OdiffOptions, OdiffResponse, OdiffServer}; -const EXPERIMENTAL_WARNING: &str = - "[EXPERIMENTAL] The \"snapshots diff\" command is experimental. \ - The command is subject to breaking changes, including removal, in any Sentry CLI release."; - #[derive(Serialize)] struct DiffReport { base_dir: String, @@ -111,11 +107,8 @@ struct CategorizedImages { pub fn make_command(command: Command) -> Command { command - .about("[EXPERIMENTAL] Compare two directories of snapshot images locally using odiff.") - .long_about(format!( - "Compare two directories of snapshot images locally using odiff.\n\n\ - {EXPERIMENTAL_WARNING}" - )) + .about("Compare two directories of snapshot images locally using odiff.") + .long_about("Compare two directories of snapshot images locally using odiff.") .arg( Arg::new("base_dir") .value_name("BASE_DIR") @@ -171,8 +164,6 @@ pub fn make_command(command: Command) -> Command { } pub fn execute(matches: &ArgMatches) -> Result<()> { - eprintln!("{EXPERIMENTAL_WARNING}"); - let base_dir = PathBuf::from( matches .get_one::("base_dir") diff --git a/src/commands/snapshots/download.rs b/src/commands/snapshots/download.rs index 6c9c0a9d28..d279cdbb7c 100644 --- a/src/commands/snapshots/download.rs +++ b/src/commands/snapshots/download.rs @@ -10,19 +10,14 @@ use crate::config::Config; use crate::utils::args::ArgExt as _; use crate::utils::fs::{path_as_url, TempFile}; -const EXPERIMENTAL_WARNING: &str = - "[EXPERIMENTAL] The \"snapshots download\" command is experimental. \ - The command is subject to breaking changes, including removal, in any Sentry CLI release."; - pub fn make_command(command: Command) -> Command { command - .about("[EXPERIMENTAL] Download baseline snapshot images from Sentry.") - .long_about(format!( + .about("Download baseline snapshot images from Sentry.") + .long_about( "Download baseline snapshot images from Sentry's preprod system to a local directory.\n\n\ Use --snapshot-id to download a specific snapshot, or --app-id to resolve the latest \ - baseline (org auth tokens require --project with a numeric project ID for --app-id).\n\n\ - {EXPERIMENTAL_WARNING}" - )) + baseline (org auth tokens require --project with a numeric project ID for --app-id).", + ) .org_arg() .project_arg(false) .arg( @@ -56,8 +51,6 @@ pub fn make_command(command: Command) -> Command { } pub fn execute(matches: &ArgMatches) -> Result<()> { - eprintln!("{EXPERIMENTAL_WARNING}"); - let config = Config::current(); let org = config.get_org(matches)?; let api_ref = Api::current(); diff --git a/src/commands/snapshots/mod.rs b/src/commands/snapshots/mod.rs index f9d68ce27d..b5981c9ffd 100644 --- a/src/commands/snapshots/mod.rs +++ b/src/commands/snapshots/mod.rs @@ -23,7 +23,7 @@ pub fn make_command(mut command: Command) -> Command { } command = command - .about("[EXPERIMENTAL] Manage and compare snapshots.") + .about("Manage and compare snapshots.") .subcommand_required(true) .arg_required_else_help(true); each_subcommand!(add_subcommand); diff --git a/src/commands/snapshots/upload.rs b/src/commands/snapshots/upload.rs index 98c32ce742..370d268196 100644 --- a/src/commands/snapshots/upload.rs +++ b/src/commands/snapshots/upload.rs @@ -25,17 +25,12 @@ use crate::utils::build_vcs::collect_git_metadata; use crate::utils::ci::is_ci; use crate::utils::fs::IMAGE_EXTENSIONS; -const EXPERIMENTAL_WARNING: &str = - "[EXPERIMENTAL] The \"snapshots upload\" command is experimental. \ - The command is subject to breaking changes, including removal, in any Sentry CLI release."; const MAX_PIXELS_PER_IMAGE: u64 = 40_000_000; pub fn make_command(command: Command) -> Command { command - .about("[EXPERIMENTAL] Upload snapshots to a project.") - .long_about(format!( - "Upload snapshots to a project.\n\n{EXPERIMENTAL_WARNING}" - )) + .about("Upload snapshots to a project.") + .long_about("Upload snapshots to a project.") .org_arg() .project_arg(false) .arg( @@ -118,8 +113,6 @@ impl ImageInfo { } pub fn execute(matches: &ArgMatches) -> Result<()> { - eprintln!("{EXPERIMENTAL_WARNING}"); - let config = Config::current(); let org = config.get_org(matches)?; let project = config.get_project(matches)?; diff --git a/tests/integration/_cases/build/build-download-help.trycmd b/tests/integration/_cases/build/build-download-help.trycmd index c0df39c686..5d0fd7c4f0 100644 --- a/tests/integration/_cases/build/build-download-help.trycmd +++ b/tests/integration/_cases/build/build-download-help.trycmd @@ -3,9 +3,6 @@ $ sentry-cli build download --help ? success Download a build artifact. -[EXPERIMENTAL] The "build download" command is experimental. The command is subject to breaking -changes, including removal, in any Sentry CLI release. - Usage: sentry-cli[EXE] build download [OPTIONS] --build-id Options: diff --git a/tests/integration/_cases/build/build-help.trycmd b/tests/integration/_cases/build/build-help.trycmd index 0710f3368f..cf5870fd39 100644 --- a/tests/integration/_cases/build/build-help.trycmd +++ b/tests/integration/_cases/build/build-help.trycmd @@ -6,7 +6,7 @@ Manage builds. Usage: sentry-cli[EXE] build [OPTIONS] Commands: - download [EXPERIMENTAL] Download a build artifact. + download Download a build artifact. upload Upload builds to a project. help Print this message or the help of the given subcommand(s) diff --git a/tests/integration/_cases/help/help-windows.trycmd b/tests/integration/_cases/help/help-windows.trycmd index 962e913767..e767d654ef 100644 --- a/tests/integration/_cases/help/help-windows.trycmd +++ b/tests/integration/_cases/help/help-windows.trycmd @@ -31,7 +31,7 @@ Commands: repos Manage repositories on Sentry. send-event Send a manual event to Sentry. send-envelope Send a stored envelope to Sentry. - snapshots [EXPERIMENTAL] Manage and compare snapshots. + snapshots Manage and compare snapshots. sourcemaps Manage sourcemaps for Sentry releases. dart-symbol-map Manage Dart/Flutter symbol maps for Sentry. upload-proguard Upload ProGuard mapping files to a project. diff --git a/tests/integration/_cases/help/help.trycmd b/tests/integration/_cases/help/help.trycmd index 2395f199bd..da0f8ff95a 100644 --- a/tests/integration/_cases/help/help.trycmd +++ b/tests/integration/_cases/help/help.trycmd @@ -31,7 +31,7 @@ Commands: repos Manage repositories on Sentry. send-event Send a manual event to Sentry. send-envelope Send a stored envelope to Sentry. - snapshots [EXPERIMENTAL] Manage and compare snapshots. + snapshots Manage and compare snapshots. sourcemaps Manage sourcemaps for Sentry releases. dart-symbol-map Manage Dart/Flutter symbol maps for Sentry. uninstall Uninstall the sentry-cli executable. diff --git a/tests/integration/_cases/snapshots/snapshots-diff-help.trycmd b/tests/integration/_cases/snapshots/snapshots-diff-help.trycmd index ec3b3a5dad..7af521a95f 100644 --- a/tests/integration/_cases/snapshots/snapshots-diff-help.trycmd +++ b/tests/integration/_cases/snapshots/snapshots-diff-help.trycmd @@ -3,9 +3,6 @@ $ sentry-cli snapshots diff --help ? success Compare two directories of snapshot images locally using odiff. -[EXPERIMENTAL] The "snapshots diff" command is experimental. The command is subject to breaking -changes, including removal, in any Sentry CLI release. - Usage: sentry-cli[EXE] snapshots diff [OPTIONS] Arguments: diff --git a/tests/integration/_cases/snapshots/snapshots-download-help.trycmd b/tests/integration/_cases/snapshots/snapshots-download-help.trycmd index 1d22e100d9..a2785981ee 100644 --- a/tests/integration/_cases/snapshots/snapshots-download-help.trycmd +++ b/tests/integration/_cases/snapshots/snapshots-download-help.trycmd @@ -6,9 +6,6 @@ Download baseline snapshot images from Sentry's preprod system to a local direct Use --snapshot-id to download a specific snapshot, or --app-id to resolve the latest baseline (org auth tokens require --project with a numeric project ID for --app-id). -[EXPERIMENTAL] The "snapshots download" command is experimental. The command is subject to breaking -changes, including removal, in any Sentry CLI release. - Usage: sentry-cli[EXE] snapshots download [OPTIONS] Options: diff --git a/tests/integration/_cases/snapshots/snapshots-upload-help.trycmd b/tests/integration/_cases/snapshots/snapshots-upload-help.trycmd index 7a22af5fa2..862f745701 100644 --- a/tests/integration/_cases/snapshots/snapshots-upload-help.trycmd +++ b/tests/integration/_cases/snapshots/snapshots-upload-help.trycmd @@ -3,9 +3,6 @@ $ sentry-cli snapshots upload --help ? success Upload snapshots to a project. -[EXPERIMENTAL] The "snapshots upload" command is experimental. The command is subject to breaking -changes, including removal, in any Sentry CLI release. - Usage: sentry-cli[EXE] snapshots upload [OPTIONS] --app-id Arguments: