From 1a08359a024f89b0fb52225abb0765961cd0f15c Mon Sep 17 00:00:00 2001 From: Nico Hinderling Date: Tue, 19 May 2026 13:58:38 -0700 Subject: [PATCH 1/2] docs(snapshots): Remove sharding references from selective testing docs Sharding support is not yet ready to document. Keep the selective testing section focused on the affected-tests use case only. Co-Authored-By: Claude --- docs/product/snapshots/uploading-snapshots/index.mdx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/product/snapshots/uploading-snapshots/index.mdx b/docs/product/snapshots/uploading-snapshots/index.mdx index b161fb167bb5a..339b79fdae245 100644 --- a/docs/product/snapshots/uploading-snapshots/index.mdx +++ b/docs/product/snapshots/uploading-snapshots/index.mdx @@ -21,7 +21,7 @@ sentry-cli build snapshots \ --project \ ``` -For the full command reference, including auto-detected git metadata and sharding behavior, see [Snapshots (CLI)](/cli/snapshots/). For an end-to-end CI setup, see [Integrating Into CI](/product/snapshots/integrating-into-ci/). +For the full command reference, including auto-detected git metadata, see [Snapshots (CLI)](/cli/snapshots/). For an end-to-end CI setup, see [Integrating Into CI](/product/snapshots/integrating-into-ci/). ### Upload Structure @@ -67,14 +67,13 @@ Snapshots supports the following image formats: ## Selective Testing -If you only generate a subset of your snapshots per CI run — for example, because you run only affected tests or shard across parallel jobs — pass the `--selective` flag on each upload: +If you only generate a subset of your snapshots per CI run — for example, because you run only affected tests — pass the `--selective` flag: ```bash -sentry-cli build snapshots ./shard-1 --app-id web-frontend --selective -sentry-cli build snapshots ./shard-2 --app-id web-frontend --selective +sentry-cli build snapshots ./snapshots --app-id web-frontend --selective ``` -When an upload is marked as selective, Sentry only diffs the snapshots you uploaded. Any snapshot that exists in the base build but was not included in the upload is treated as **unchanged** (skipped) rather than removed. Sentry merges selective uploads that share the same commit SHA and `app-id`, so you can upload shards independently and they combine into a single build. +When an upload is marked as selective, Sentry only diffs the snapshots you uploaded. Any snapshot that exists in the base build but was not included in the upload is treated as **unchanged** (skipped) rather than removed. Because Sentry cannot distinguish a deliberately deleted snapshot from one From c95053d29837d81480d4652047c6a6055965f098 Mon Sep 17 00:00:00 2001 From: Nico Hinderling Date: Tue, 19 May 2026 14:11:06 -0700 Subject: [PATCH 2/2] docs(snapshots): Remove sharding references from CLI selective uploads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align the CLI reference page with the product docs — describe --selective in terms of subset uploads (affected tests), not sharding. Co-Authored-By: Claude --- docs/cli/snapshots.mdx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/cli/snapshots.mdx b/docs/cli/snapshots.mdx index d1d986110ffec..d848a3414e2fb 100644 --- a/docs/cli/snapshots.mdx +++ b/docs/cli/snapshots.mdx @@ -52,14 +52,13 @@ For PRs from forks, set `--base-repo-name` to the upstream repository so Sentry ## Selective Uploads -If you shard snapshot generation across parallel CI jobs and upload each shard separately, pass `--selective` on every upload: +If you only upload a subset of your snapshots per CI run — for example, because you run only affected tests — pass `--selective`: ```bash -sentry-cli build snapshots ./shard-1 --app-id web-frontend --selective -sentry-cli build snapshots ./shard-2 --app-id web-frontend --selective +sentry-cli build snapshots ./snapshots --app-id web-frontend --selective ``` -Sentry merges selective uploads that share the same commit SHA and `app-id`. Removals and renames cannot be detected when using `--selective`, because Sentry cannot distinguish an intentionally deleted snapshot from one that simply wasn't part of this shard. +When an upload is marked as selective, Sentry only diffs the snapshots you uploaded. Any snapshot that exists in the base build but was not included in the upload is treated as unchanged rather than removed. Removals and renames cannot be detected when using `--selective`, because Sentry cannot distinguish a deliberately deleted snapshot from one that was not part of the subset. ## Diff Threshold @@ -84,7 +83,7 @@ sentry-cli build snapshots [OPTIONS] --app-id | `--auth-token ` | Sentry auth token. Can also be set via `SENTRY_AUTH_TOKEN`. | | `-o`, `--org ` | Sentry organization slug. Can also be set via `SENTRY_ORG`. | | `-p`, `--project ` | Sentry project slug. Can also be set via `SENTRY_PROJECT`. | -| `--selective` | Mark the upload as a subset. Use when sharding snapshot generation across parallel jobs. | +| `--selective` | Mark the upload as a subset. Use when uploading only a portion of your snapshots (for example, affected tests only). | | `--diff-threshold ` | Float between `0.0` and `1.0`. Sentry only reports images as changed if the percentage of changed pixels exceeds this value. | | `--head-sha ` | Commit SHA for the upload. Auto-detected in CI. | | `--base-sha ` | Base commit SHA for comparison (PR only). Auto-detected from merge-base. |