[No QA] Run pod install if node_modules changed#37059
Merged
Merged
Conversation
Contributor
Author
|
Not sure why I was getting a diff in compiled GH actions, but I think that someone just failed to do that during a dependency upgrade or something |
8d40bd4 to
dea5efa
Compare
|
@ Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
chiragsalian
approved these changes
Feb 23, 2024
thienlnam
approved these changes
Feb 23, 2024
thienlnam
left a comment
Contributor
There was a problem hiding this comment.
Nice nice, looks like you figured out the diff issue
Contributor
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
Contributor
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
10 tasks
Contributor
|
🚀 Deployed to staging by https://github.com/chiragsalian in version: 1.4.44-0 🚀
|
This was referenced Feb 27, 2024
Contributor
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.44-13 🚀
|
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.
Details
So what's going on here? Basically, only a relatively small portion of our iOS native code actually lives in
ios/Pods. A lot of it actually lives innode_modules, and thanks to some pretty complex ruby scripts in ourPodfile(from React Native / expo, not us), that native code gets bundled with the iOS build.Furthermore, Expo modifies some of the native code's source in a post-integrate hook:
This means that our current strategy for caching pod installs doesn't work as expected. Currently, we run a
pod installif and only if:Podfile.lockchanged orPodfile.lockandManifest.lockhave divergedIt does not account for if native code in
node_moduleshas changed.To fix it, we check if
node_moduleschanged by looking for a diff inpackage-lock.jsonandpatches. This is already handled by ourSetupNodeaction, so we just returncache-hitfrom there.Case study
@thienlnam was helpful in providing and example when a bad cache led to build failures here. If you look at the first run, you'll see that the
node_modulescache was missed. So we would have run thepod installin that case ✅Now, we run
pod installif any of the following are true:Podfile.lockhas changedPodfile.lockandManifest.lockare out-of-syncpackage-lock.jsonorpatcheshave changedThis should hopefully fix build errors stemming from a corrupted pod cache, without disabling caching altogether.
Fixed Issues
$ n/a - I don't think we have an issue; slack context in a few places but most recently here
Tests
Not really sure how to test, so we'll just have to be observant and hopefully we'll see more reliable iOS builds.
Offline tests
None.
QA Steps
None.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop