Stop uploading the same screenshot twice - #178
Merged
Merged
Conversation
deliver sends every picture, then reads the set back from App Store Connect and sends again whatever it cannot find. The store lists a picture a few seconds after it takes it, so what deliver cannot find is just the locales it sent last. The second copy joins the first, fills the locale to the ten pictures the store allows, and the rest are dropped - leaving it both doubled and short, while the run reports success. No upload has failed; only the reading back has. So wait and read again, up to three minutes, and if a picture really is missing, stop and say so rather than sending another. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W2XM93Raj1jyvUuYmpQrcz
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0db3a9d77d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Naming an earlier run in screenshots_from_run runs the two listing jobs alone, against that run's framed artifact. Nothing is built, photographed, uploaded or tagged, and no build number is spent. The lane clears each locale before it uploads, so this repairs a set however it got broken, without a quarter hour of simulators to take the same pictures again. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W2XM93Raj1jyvUuYmpQrcz
Six looks thirty seconds apart is five waits, not six, so the last one came at 150 seconds while the error reported 180. One look more. The README had grown four paragraphs about screenshots going up twice. Why deliver does it belongs next to the code that stops it, so the README keeps what a reader has to do and drops the rest. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W2XM93Raj1jyvUuYmpQrcz
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.
1.41's screenshots went up doubled twice. The log says why, and it is not what #177 guessed.
Not one upload failed. All 132 pictures were sent and accepted. What failed is deliver's second pass: it reads the set back from App Store Connect and re-sends anything it cannot find. The store lists a picture a few seconds after it takes it, so what deliver cannot find is only the locales it sent last -
svandtr, at the end of the alphabet, in both apps, in both runs.The second copy then joins the first, fills the locale to the ten screenshots a set allows, and the rest are dropped:
So the locale ends up doubled and short, and the job passes.
Stop sending a second copy
The Fastfile patches
Deliver::UploadScreenshots#retry_upload_screenshots_if_neededto wait and look again - six times, thirty seconds apart, asking the store fresh each time - and to fail loudly if a picture is still missing after that. It never sends a second copy.Exercised against the real deliver 2.237.0:
The
listingcheck from #177 stays as a backstop, in case a fastlane upgrade moves what is patched, and now also catchesToo many screenshots found, which is how the dropped pictures were silent.Repair without photographing anything again
A release can now be started with
screenshots_from_runset to an earlier run's id. Only the twolistingjobs run, against that run'sframedartifact. Nothing is built, photographed, uploaded or tagged, no build number is spent, and it takes about five minutes instead of forty.Since the lane clears each locale before it uploads, that repairs a set however it got broken. It is how 1.41's screenshots get fixed: merge this, then dispatch with
version1.41 andscreenshots_from_run32182462133.Not the beta sync flag
deliver's
sync_screenshotswas considered. It diffs local against remote instead of clearing first, which sounds like the right shape, but it computeslocal - remotefrom the same freshly-fetched listing and so carries the identical race. Its comparison key islocale/filename/checksumwith no position, soArray#-deletes both copies of a duplicate before re-uploading one - it converges, but through a pass where the locale is empty. It is beta, gated behindFASTLANE_ENABLE_BETA_DELIVER_SYNC_SCREENSHOTS, and announces it may break. Not worth it when the plain path is deterministic once the retry is gone.🤖 Generated with Claude Code