Skip to content

Store visual baseline images once by content hash - #59581

Merged
robhogan merged 1 commit into
mainfrom
robhogan/visual-cas-baselines
Nov 12, 2026
Merged

robhogan merged 1 commit into
mainfrom
robhogan/visual-cas-baselines

Conversation

@robhogan

@robhogan robhogan commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Every push to main currently uploads a full copy of every baseline screenshot (~3.5MB, ~100 objects), even with no visual change.

This stores each image once at blobs/<sha256>.png, with each commit's manifest referring to images by hash, so a push only uploads its manifests and any new images. Older baselines are still read from their per-commit paths, so there's nothing to migrate.

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.

@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
@robhogan
robhogan force-pushed the robhogan/visual-cas-baselines branch from 9b0d0ae to 63e046b Compare November 10, 2026 15:37
@robhogan
robhogan changed the base branch from robhogan/visual-retake to main November 10, 2026 15:37
@robhogan
robhogan marked this pull request as ready for review November 10, 2026 15:37
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 10, 2026
@robhogan
robhogan requested a review from cortinico November 10, 2026 16:10
@robhogan
robhogan added this pull request to stack #59971 November 12, 2026 14:16
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]
@robhogan
robhogan force-pushed the robhogan/visual-cas-baselines branch from 63e046b to 00b84c5 Compare November 12, 2026 14:18

@cortinico cortinico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@robhogan
robhogan merged commit e670a78 into main Nov 12, 2026
92 checks passed
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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants