Repository navigation
Hosted repack: share a run's repack by native fingerprint, not by the build each job found - #71
Merged
Merged
Conversation
… not by the build each found to repack On a project that reviews often, the newest builds with the fingerprint are all repacks, so the build lookup returns whichever repack finished last. In brentvatne/euxy#179 (review run 40042718931) a target that started late found the repack the others had just made, its share key matched none, and it waited 3 minutes before making a second iOS repack.
Viewer preview of edf0a60 · reports from brentvatne/euxy#163
The link stays the same on every push. Deploy run |
…shared repack, and comments and CI-FLOW that say what the key now holds
Merged
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.
A run's matrix jobs now share one hosted repack by the native fingerprint they repack, instead of by the build each job found to repack.
Why
In brentvatne/euxy#179 (review run 40042718931), four iOS targets were meant to share one repack:
7f6b592a. iPhone repacked it, and the other two waited for that repack.2ebcfd8d, because a repack is itself a build with the same profile and fingerprint.existingBuilddoes prefer a build Explore didn't repack, but only among the 20 it lists. On euxy, the 50 most recent iOSexplorebuilds are all repacks, so it falls back to the newest one, and that changes as repacks finish.Change
hostedRepackShareKeytakes the nativefingerprintin place ofnativeBuildId(contract v3). A follower now runs the leader's repack of whichever build with that fingerprint the leader found. That's the native code the fingerprint covers. What a repack keeps from its source beyond that, such as its Info.plist and the toolchain it was built with, can differ between builds of one fingerprint.existingBuildalready treats such builds as interchangeable, so the change adds little risk, and it makes the targets more consistent with each other.prepareHostedRepackpasses the fingerprintprepareExactSourceBuildalready has.existingBuild's doc, therepackWaitscomment, and CI-FLOW's item 1 and the paragraph on what the key holds.Tests
ci-map.test.mjs, the incident end to end. The leader repacks and its build finishes. A late target whose lookup returns that repack as its build to repack looks once, finds the finished repack, downloads it and makes no repack of its own. The test fails against main'seas-build.ts.hosted-repack.test.mjs: two different source build ids with the same fingerprint give the same key, and a different fingerprint still gives a different key.An independent adversarial review found no case where the new key shares wrongly. It checked head and base, reruns (the attempt is in the scope), mixed versions (the release is in the key), the native-build-made-here path (no marker) and the environment-fetch-failure path (no share).
Not changed: follow-ups
nativeEasBuildId, and the fallback app version and build number, from the build it found, not from the leader's repack it runs. On main this already happens whenever all 20 listed builds are repacks. A wrong build number would also need EAS remote versioning plus a new native build landing mid-run.existingBuildalmost never finds a true native build, andnativeEasBuildIdoften names a repack. Writing the source build id into the repack's message would let lookup and reports name the real native build.🤖 Generated with Claude Code