Skip to content

Commit d2981f6

Browse files
ref: Remove experimental flag from snapshots and build commands (#3329)
## Summary The `snapshots` commands (`upload`, `download`, `diff`) and the `build download` command were marked experimental. Each printed an `[EXPERIMENTAL] ... subject to breaking changes` warning to stderr on every invocation and prefixed its `--help` text with `[EXPERIMENTAL]`. These commands are now stable, so this removes: - The per-command `EXPERIMENTAL_WARNING` constants and their `eprintln!` runtime warnings. - The `[EXPERIMENTAL]` prefixes from `about(...)` strings (including the `snapshots` parent command) and the `{EXPERIMENTAL_WARNING}` interpolation in `long_about` text. ## Motivation The experimental warnings added noise to every run and signaled instability that no longer applies now that these commands are supported. ## Changes - `src/commands/snapshots/{mod,upload,download,diff}.rs` — remove warnings and experimental help markers. - `src/commands/build/download.rs` — same for `build download`. - Updated the affected `trycmd` help fixtures (snapshots/build help, top-level help, Windows help). Fixtures were edited by hand rather than via `TRYCMD=overwrite` to preserve the `[EXE]` Windows-suffix placeholders. ## Testing - `cargo build`, `cargo clippy` (clean) - `cargo test --test mod` — 190 passed, 0 failed
1 parent 13392f6 commit d2981f6

12 files changed

Lines changed: 14 additions & 56 deletions

File tree

src/commands/build/download.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,10 @@ use crate::config::Config;
1010
use crate::utils::args::ArgExt as _;
1111
use crate::utils::fs::TempFile;
1212

13-
const EXPERIMENTAL_WARNING: &str =
14-
"[EXPERIMENTAL] The \"build download\" command is experimental. \
15-
The command is subject to breaking changes, including removal, in any Sentry CLI release.";
16-
1713
pub fn make_command(command: Command) -> Command {
1814
command
19-
.about("[EXPERIMENTAL] Download a build artifact.")
20-
.long_about(format!(
21-
"Download a build artifact.\n\n{EXPERIMENTAL_WARNING}"
22-
))
15+
.about("Download a build artifact.")
16+
.long_about("Download a build artifact.")
2317
.org_arg()
2418
.arg(
2519
Arg::new("build_id")
@@ -53,7 +47,6 @@ fn extension_from_url(url: &str) -> Result<&str> {
5347
}
5448

5549
pub fn execute(matches: &ArgMatches) -> Result<()> {
56-
eprintln!("{EXPERIMENTAL_WARNING}");
5750
let config = Config::current();
5851
let org = config.get_org(matches)?;
5952
let build_id = matches

src/commands/snapshots/diff.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ use crate::utils::fs::{path_as_url, IMAGE_EXTENSIONS};
1111
use crate::utils::odiff::binary::ensure_binary;
1212
use crate::utils::odiff::server::{OdiffOptions, OdiffResponse, OdiffServer};
1313

14-
const EXPERIMENTAL_WARNING: &str =
15-
"[EXPERIMENTAL] The \"snapshots diff\" command is experimental. \
16-
The command is subject to breaking changes, including removal, in any Sentry CLI release.";
17-
1814
#[derive(Serialize)]
1915
struct DiffReport {
2016
base_dir: String,
@@ -111,11 +107,8 @@ struct CategorizedImages {
111107

112108
pub fn make_command(command: Command) -> Command {
113109
command
114-
.about("[EXPERIMENTAL] Compare two directories of snapshot images locally using odiff.")
115-
.long_about(format!(
116-
"Compare two directories of snapshot images locally using odiff.\n\n\
117-
{EXPERIMENTAL_WARNING}"
118-
))
110+
.about("Compare two directories of snapshot images locally using odiff.")
111+
.long_about("Compare two directories of snapshot images locally using odiff.")
119112
.arg(
120113
Arg::new("base_dir")
121114
.value_name("BASE_DIR")
@@ -171,8 +164,6 @@ pub fn make_command(command: Command) -> Command {
171164
}
172165

173166
pub fn execute(matches: &ArgMatches) -> Result<()> {
174-
eprintln!("{EXPERIMENTAL_WARNING}");
175-
176167
let base_dir = PathBuf::from(
177168
matches
178169
.get_one::<String>("base_dir")

src/commands/snapshots/download.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,14 @@ use crate::config::Config;
1010
use crate::utils::args::ArgExt as _;
1111
use crate::utils::fs::{path_as_url, TempFile};
1212

13-
const EXPERIMENTAL_WARNING: &str =
14-
"[EXPERIMENTAL] The \"snapshots download\" command is experimental. \
15-
The command is subject to breaking changes, including removal, in any Sentry CLI release.";
16-
1713
pub fn make_command(command: Command) -> Command {
1814
command
19-
.about("[EXPERIMENTAL] Download baseline snapshot images from Sentry.")
20-
.long_about(format!(
15+
.about("Download baseline snapshot images from Sentry.")
16+
.long_about(
2117
"Download baseline snapshot images from Sentry's preprod system to a local directory.\n\n\
2218
Use --snapshot-id to download a specific snapshot, or --app-id to resolve the latest \
23-
baseline (org auth tokens require --project with a numeric project ID for --app-id).\n\n\
24-
{EXPERIMENTAL_WARNING}"
25-
))
19+
baseline (org auth tokens require --project with a numeric project ID for --app-id).",
20+
)
2621
.org_arg()
2722
.project_arg(false)
2823
.arg(
@@ -56,8 +51,6 @@ pub fn make_command(command: Command) -> Command {
5651
}
5752

5853
pub fn execute(matches: &ArgMatches) -> Result<()> {
59-
eprintln!("{EXPERIMENTAL_WARNING}");
60-
6154
let config = Config::current();
6255
let org = config.get_org(matches)?;
6356
let api_ref = Api::current();

src/commands/snapshots/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn make_command(mut command: Command) -> Command {
2323
}
2424

2525
command = command
26-
.about("[EXPERIMENTAL] Manage and compare snapshots.")
26+
.about("Manage and compare snapshots.")
2727
.subcommand_required(true)
2828
.arg_required_else_help(true);
2929
each_subcommand!(add_subcommand);

src/commands/snapshots/upload.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,12 @@ use crate::utils::build_vcs::collect_git_metadata;
2525
use crate::utils::ci::is_ci;
2626
use crate::utils::fs::IMAGE_EXTENSIONS;
2727

28-
const EXPERIMENTAL_WARNING: &str =
29-
"[EXPERIMENTAL] The \"snapshots upload\" command is experimental. \
30-
The command is subject to breaking changes, including removal, in any Sentry CLI release.";
3128
const MAX_PIXELS_PER_IMAGE: u64 = 40_000_000;
3229

3330
pub fn make_command(command: Command) -> Command {
3431
command
35-
.about("[EXPERIMENTAL] Upload snapshots to a project.")
36-
.long_about(format!(
37-
"Upload snapshots to a project.\n\n{EXPERIMENTAL_WARNING}"
38-
))
32+
.about("Upload snapshots to a project.")
33+
.long_about("Upload snapshots to a project.")
3934
.org_arg()
4035
.project_arg(false)
4136
.arg(
@@ -118,8 +113,6 @@ impl ImageInfo {
118113
}
119114

120115
pub fn execute(matches: &ArgMatches) -> Result<()> {
121-
eprintln!("{EXPERIMENTAL_WARNING}");
122-
123116
let config = Config::current();
124117
let org = config.get_org(matches)?;
125118
let project = config.get_project(matches)?;

tests/integration/_cases/build/build-download-help.trycmd

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ $ sentry-cli build download --help
33
? success
44
Download a build artifact.
55

6-
[EXPERIMENTAL] The "build download" command is experimental. The command is subject to breaking
7-
changes, including removal, in any Sentry CLI release.
8-
96
Usage: sentry-cli[EXE] build download [OPTIONS] --build-id <build_id>
107

118
Options:

tests/integration/_cases/build/build-help.trycmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Manage builds.
66
Usage: sentry-cli[EXE] build [OPTIONS] <COMMAND>
77

88
Commands:
9-
download [EXPERIMENTAL] Download a build artifact.
9+
download Download a build artifact.
1010
upload Upload builds to a project.
1111
help Print this message or the help of the given subcommand(s)
1212

tests/integration/_cases/help/help-windows.trycmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Commands:
3131
repos Manage repositories on Sentry.
3232
send-event Send a manual event to Sentry.
3333
send-envelope Send a stored envelope to Sentry.
34-
snapshots [EXPERIMENTAL] Manage and compare snapshots.
34+
snapshots Manage and compare snapshots.
3535
sourcemaps Manage sourcemaps for Sentry releases.
3636
dart-symbol-map Manage Dart/Flutter symbol maps for Sentry.
3737
upload-proguard Upload ProGuard mapping files to a project.

tests/integration/_cases/help/help.trycmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Commands:
3131
repos Manage repositories on Sentry.
3232
send-event Send a manual event to Sentry.
3333
send-envelope Send a stored envelope to Sentry.
34-
snapshots [EXPERIMENTAL] Manage and compare snapshots.
34+
snapshots Manage and compare snapshots.
3535
sourcemaps Manage sourcemaps for Sentry releases.
3636
dart-symbol-map Manage Dart/Flutter symbol maps for Sentry.
3737
uninstall Uninstall the sentry-cli executable.

tests/integration/_cases/snapshots/snapshots-diff-help.trycmd

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ $ sentry-cli snapshots diff --help
33
? success
44
Compare two directories of snapshot images locally using odiff.
55

6-
[EXPERIMENTAL] The "snapshots diff" command is experimental. The command is subject to breaking
7-
changes, including removal, in any Sentry CLI release.
8-
96
Usage: sentry-cli[EXE] snapshots diff [OPTIONS] <BASE_DIR> <HEAD_DIR>
107

118
Arguments:

0 commit comments

Comments
 (0)