[build-tools] Fix runtime version mismatch from premature fingerprint in eas build:internal#3893
Open
AbbanMustafa wants to merge 2 commits into
Open
[build-tools] Fix runtime version mismatch from premature fingerprint in eas build:internal#3893AbbanMustafa wants to merge 2 commits into
AbbanMustafa wants to merge 2 commits into
Conversation
… in eas build:internal
|
Subscribed to pull request
Generated by CodeMention |
… in eas build:internal
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3893 +/- ##
==========================================
- Coverage 59.01% 59.00% -0.01%
==========================================
Files 935 935
Lines 40933 40947 +14
Branches 8624 8630 +6
==========================================
+ Hits 24153 24156 +3
- Misses 16684 16695 +11
Partials 96 96 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Why
Workflow builds were failing with a false-positive "Runtime version mismatch" error for jobs using calculate expo updates.
Root cause: workflow builds have an extra internal phase
build:internalthat runs on the worker to resolve job config. The problem is the order of operations:ctx.metadata.runtimeVersionios/orandroid/directory, native code is generatedFor some projects the fingerprint legitimately differs pre vs post prebuild because the react-native autolinking config changes once native directories exist. The fingerprint should reflect the post-prebuild state eas build:internal is just computing it too early.
How
Two changes:
ctx.metadata.runtimeVersionis never set from a stale pre-prebuildfingerprint, so the mismatch check in CONFIGURE_EXPO_UPDATES short-circuits and no error is thrown.
Test Plan
Trigger a workflow build on a project using runtimeVersion: { policy: 'fingerprint' } with a managed workflow (no pre-existing ios/ or android/ directories). Before this fix the build would fail in CONFIGURE_EXPO_UPDATES with "Runtime version calculated on local machine not equal to runtime version calculated during build."