Skip to content

[visual testing] Read the storage bucket from the visual config - #60240

Open
robhogan wants to merge 1 commit into
mainfrom
robhogan/visual-bucket-config
Open

robhogan wants to merge 1 commit into
mainfrom
robhogan/visual-bucket-config

Conversation

@robhogan

Copy link
Copy Markdown
Collaborator

Screenshot retakes never run on PRs from forks, which are most PRs (Meta exports included). Capture reads the bucket's URL from a repository variable, and variables are empty in pull_request runs from forks. All 3 transient differences reported on PRs since #60110 were on forks.

This names the bucket once, in config.json, for capture, compare and approve. VISUAL_BUCKET and VISUAL_PUBLIC_BASE_URL can be deleted once this lands. The GCP project and identity provider stay as variables.

Changelog: [Internal]

Test plan:
New unit tests. Ran compare's and approve's prepare read-only against the real bucket, and both matched CI's results.

Retakes never run on pull requests from forks. Capture reads the public baseline URL from the `VISUAL_PUBLIC_BASE_URL` repository variable, and variables are empty in `pull_request` runs from forks, so `capture.js` skips the retake. That was the case in all 115 fork capture jobs from 2026-11-19 to 2026-11-23, and forks, Meta exports included, made 55 of the 77 PR reports in that time. All 3 transient differences reported on PRs then were on forks (two Apple Intelligence notifications and an unsettled scroll), while retakes replaced 6 bad captures on same-repo PRs and `main`.

This names the bucket once, as `bucket` in `packages/rn-tester/visual-tests/config.json`, and works out its public URL from it. Capture, compare and approve all read it from there, and the upload steps read it with `jq`. The `VISUAL_BUCKET` and `VISUAL_PUBLIC_BASE_URL` variables are no longer used and can be deleted once this lands, so there is no second copy to drift. `VISUAL_GCP_PROJECT` and `VISUAL_WORKLOAD_IDENTITY_PROVIDER` stay, since they grant upload access and keep compare from running on forks of the repository.

Changelog: [Internal]

Test plan:
New unit tests for the config, and actionlint reports nothing for the three workflows. Against the real bucket, with nothing uploaded and no GitHub writes: compare's `prepare` on main run 45069821697 found both baselines at distance 0 with no differences, as CI did, approve's `prepare` for #60201 got the fingerprint of its stored report, and capture's baseline lookup found the iOS baseline at the URL worked out from the config.
@robhogan
robhogan requested a review from cortinico November 23, 2026 17:53
@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 Nov 23, 2026
@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 23, 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. 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.

1 participant