Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/cli/snapshots.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ sentry-cli build snapshots ./shard-1 --app-id web-frontend --selective
sentry-cli build snapshots ./shard-2 --app-id web-frontend --selective
```

Sentry merges selective uploads that share the same commit SHA and `app-id`. Removals and renames cannot be detected on PRs when using `--selective`, because Sentry cannot distinguish an intentionally deleted snapshot from one that simply wasn't part of this shard.
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.

## Diff Threshold

Expand Down
17 changes: 17 additions & 0 deletions docs/product/snapshots/uploading-snapshots/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,21 @@ Snapshots supports the following image formats:
- PNG
- JPEG

## 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:

```bash
sentry-cli build snapshots ./shard-1 --app-id web-frontend --selective
sentry-cli build snapshots ./shard-2 --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.

<Alert level="warning">
Because Sentry cannot distinguish a deliberately deleted snapshot from one
that was not part of the subset, removals and renames cannot be detected when
using `--selective`.
</Alert>
Comment thread
NicoHinderling marked this conversation as resolved.

For the full `sentry-cli build snapshots` flag reference, see [Snapshots (CLI)](/cli/snapshots/).
Loading