Skip to content

Store visual baseline images once by content hash - #59581

Draft
robhogan wants to merge 1 commit into
robhogan/visual-retakefrom
robhogan/visual-cas-baselines
Draft

robhogan wants to merge 1 commit into
robhogan/visual-retakefrom
robhogan/visual-cas-baselines

Conversation

@robhogan

@robhogan robhogan commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Reduces storage and upload volume for E2E screenshot testing.

Currently, for simplicity, every push to main uploads a full copy of every screenshot under its own commit - ~3.5MB a push for ~50 tests across both platforms - so storage grows with pushes rather than with visual changes.

This stores each baseline image once at blobs/<sha256>.png, and each commit's manifest refers to its images by hash. A push uploads its manifests plus only the images not already in blobs/, so one with no visual change publishes a few KB. Manifests are still uploaded last, so a baseline only exists once its images do.

Older baselines are still read from their per-commit paths, so there's nothing to migrate. Nothing expires baselines/ or blobs/.

We plan to move storage backends, so I'd land this before we switch and we'll just have a clean base in the new backend. (Note this wouldn't have been possible with backends that enforce expiry, but GCP is fine)

Changelog: [Internal]

Test plan:
New unit tests. Checked against the real bucket that an existing baseline still resolves from its old path, and that a missing blob is detected. The first real publish will be the first push to main after this lands.

Every push to main uploads a full copy of every screenshot under its own commit, ~3.5MB a push, so storage grows with pushes rather than with visual changes. Baseline images are now stored once at `blobs/<sha256>.png`, and each commit's manifest (marked `imageStore: 'blobs'`) refers to them by hash. A push only uploads its manifests and any images not already in `blobs/`. Older baselines without `imageStore` are still read from their per-commit paths.

Changelog: [Internal]
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant