-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[No QA] Run pod install if node_modules changed #37059
Conversation
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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice nice, looks like you figured out the diff issue
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/chiragsalian in version: 1.4.44-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.44-13 🚀
|
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 install
if and only if:Podfile.lock
changed orPodfile.lock
andManifest.lock
have divergedIt does not account for if native code in
node_modules
has changed.To fix it, we check if
node_modules
changed by looking for a diff inpackage-lock.json
andpatches
. This is already handled by ourSetupNode
action, so we just returncache-hit
from 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_modules
cache was missed. So we would have run thepod install
in that case ✅Now, we run
pod install
if any of the following are true:Podfile.lock
has changedPodfile.lock
andManifest.lock
are out-of-syncpackage-lock.json
orpatches
have 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop