[build-tools] Regenerate Android autolinking after cache restore - #4288
Open
expo-tuft[bot] wants to merge 2 commits into
Open
[build-tools] Regenerate Android autolinking after cache restore#4288expo-tuft[bot] wants to merge 2 commits into
expo-tuft[bot] wants to merge 2 commits into
Conversation
Co-authored-by: abbanmustafa <19319135+abbanmustafa@users.noreply.github.com>
Co-authored-by: abbanmustafa <19319135+abbanmustafa@users.noreply.github.com>
|
✅ Thank you for adding the changelog entry! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4288 +/- ##
==========================================
+ Coverage 64.05% 64.27% +0.22%
==========================================
Files 1043 1047 +4
Lines 48017 48294 +277
Branches 10133 10186 +53
==========================================
+ Hits 30753 31036 +283
+ Misses 17148 17142 -6
Partials 116 116 ☔ 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
SDK 54 Android builds can restore React Native's generated
android/build/generated/autolinking/autolinking.jsonfrom a Windows environment. The file contains absoluteC:\\...native module paths. On the Linux worker, Gradle then links each module project to a nonexistent directory and reportsNo matching variant ... No variants exist.This cluster produced 465 Datadog events over seven days. The dominant AGP 8.11.0 / SDK 54 cluster accounts for 318 events across 177 accounts and 178 apps. Datadog logs
Related reports identified the stale cross-platform autolinking file and recommended deleting the generated directory as a workaround: expo/expo#42370, expo/expo#47354.
Authored with @AbbanMustafa.
What changed
After restoring the user cache for an Android cloud build, remove only
android/build/generated/autolinking. React Native regenerates the cache from the current worker's project paths during Gradle configuration. Other Android build outputs and caches are untouched.Staging verification
The same SDK 54 project archive, build profile, and fingerprint (
1bd5d7db7da9c689701fda1e5e1df15ad382baf2) were run against both staging workers:main:ERROREDwithEAS_BUILD_UNKNOWN_GRADLE_ERRORafter consuming valid autolinking metadata containing Windows absolute paths.808383c:FINISHEDand produced an APK.Staging was restored to current
mainafter verification (deployment).Tests
yarn workspace @expo/build-tools test— 1,182 tests passedyarn fmt:check— passed