feat(snapshots): Add image-name manifest mode#267
Open
cameroncooke wants to merge 2 commits into
Open
Conversation
…ploads Support selective SnapshotPreviews runs by emitting the complete set of logical image names before rendering. When SNAPSHOT_PREVIEWS_ALL_IMAGE_NAMES_FILE is set, discoverPreviews writes the sorted, de-duplicated image names to that file and returns without rendering, so the name-generation phase produces no image or sidecar output. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a reference table for the supported test-runner environment variables and clarify that the export and all-image-names modes are mutually exclusive. Rename the all-image-names env key to SNAPSHOTS_ALL_IMAGE_NAMES_FILE so it matches the SNAPSHOTS_ naming used by the other variables. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0948810 to
b08538d
Compare
NicoHinderling
approved these changes
Jun 5, 2026
| previewIndex: previewIndex | ||
| ) else { | ||
| continue | ||
| } |
Contributor
There was a problem hiding this comment.
nice, im assuming this exactly matches the image_file_name value generated for a given snapshot 👏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add an image-name manifest mode for Sentry selective testing.
What Changed
When
TEST_RUNNER_SNAPSHOTS_ALL_IMAGE_NAMES_FILEis set,SnapshotTestdiscovers previews using the existing include/exclude filters, writes a sorted and de-duplicated list of logical.pngimage names, and returns without rendering previews.Why This Exists
Sentry selective uploads need a complete list of the snapshot images that are still part of the tracked suite. During a selective run, only some images may be uploaded. The manifest tells Sentry which missing images were intentionally skipped by the selective run, instead of treating them as removed from the suite.
How It Is Used
A CI workflow first runs SnapshotPreviews in manifest mode for each
SnapshotTestgroup that participates in selective testing, then merges those files into one complete manifest. The workflow then renders only the selected group for the current run and uploads those rendered images with the merged manifest.Operational Constraints
Manifest generation currently emits names for the selected
SnapshotTestclass in a single invocation. Workflows that split previews across multiple participating test classes must run manifest generation once for each class and merge the resulting files in CI before upload. SnapshotPreviews does not aggregate multiple test classes into one manifest internally.Filter Semantics
The manifest uses the same discovery filters as rendering. Inclusion filters define which snapshots belong to a selectable group. Exclusion filters remove snapshots from the tracked set, so excluded names are not written to the manifest.
Mutually Exclusive Modes
TEST_RUNNER_SNAPSHOTS_EXPORT_DIRrenders PNG/JSON sidecars.TEST_RUNNER_SNAPSHOTS_ALL_IMAGE_NAMES_FILEwrites image names only. These modes are mutually exclusive and are intended to run as separate CI steps.Device-Aware Names
The generated image-name list applies the same preview-device filtering as rendering, using the current simulator device name or model identifier so the manifest matches the images a run would produce.
Example
Refs EME-1182