Skip to content

ci(ios): send doc screenshots that stay unstable to a separate PR - #4447

Merged
mfazekas merged 2 commits into
mainfrom
ci/doc-screenshot-flaky-history
Nov 14, 2026
Merged

mfazekas merged 2 commits into
mainfrom
ci/doc-screenshot-flaky-history

Conversation

@mfazekas

@mfazekas mfazekas commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Description

Follow-up to #4446. A doc screenshot that differs from the docs and from last night's capture is held back as "Unstable, not updated", so an example that renders differently every night would hide real changes indefinitely.

  1. update-doc-screenshots.js keeps a per-screenshot history in FLAKY_DIR/history.json: consecutive unstable nights, the first night, and the last 7 nights' % off the docs and % off last night. The nightly downloads it (doc-screenshot-history artifact) from the run it takes the previous capture from and uploads the new one. Every night the job summary lists the unstable screenshots.
  2. After 5 unstable nights in a row a screenshot is copied to a separate branch, auto/example-screenshots-flaky, never to the normal screenshots branch. Its commit message, which becomes the PR body, lists each screenshot with its night count and recent diffs and asks for a manual check. Stable changes keep going to the normal PR, so that one can be merged quickly and the flaky one checked or closed on its own.
  3. While the flaky PR is open, new flaky screenshots update the same PR: the branch is rebuilt on maps-docs main with the open PR's screenshots carried over. If the PR is closed without merging, nothing is reopened; the count has already reset, so a screenshot that keeps flapping is offered again in a new PR after another 5 nights.

maps-docs needs a matching change, which this PR doesn't make: example-screenshots-pr.yml there only runs for auto/example-screenshots, so it also has to trigger on auto/example-screenshots-flaky (with a per-branch concurrency group). Until then the flaky branch is pushed but no PR is opened for it.

I preferred this over a looser threshold against the accepted screenshot, which still hides changes smaller than the noise, and over updating when the example source changed, which misses style, tile and SDK changes.

Tested locally with a fixture script that replays 8 nights of synthetic captures (nights with only flaky, only stable and both kinds of changes, a missing capture, a night without a previous capture, the count reset), and runs the new workflow step against a local maps-docs repo with a stubbed gh (new PR, open PR with carry-over after main moved, same screenshot flagged again, closed PR). I didn't run the workflow itself, since it pushes to maps-docs.

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

Screenshot OR Video

Component to reproduce the issue you're fixing

…er 5 nights

Keep a per-screenshot count of consecutive nights held back as unstable in a
doc-screenshot-history artifact, list them in the job summary, and after 5
nights update the screenshot anyway and flag it in the maps-docs PR for a
manual look.
…ocs PR

After 5 unstable nights, push the captures to auto/example-screenshots-flaky
instead of the normal screenshots branch. While its PR is open, earlier flaky
screenshots are carried over and the PR is updated in place.
@mfazekas mfazekas changed the title ci(ios): flag doc screenshots that stay unstable ci(ios): send doc screenshots that stay unstable to a separate PR Nov 13, 2026
@mfazekas
mfazekas merged commit 8c56dfe into main Nov 14, 2026
10 checks passed
@mfazekas
mfazekas deleted the ci/doc-screenshot-flaky-history branch November 14, 2026 21:14

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant