-
Notifications
You must be signed in to change notification settings - Fork 89
Migrate to react-native-nitro-sqlite
#602
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
Migrate to react-native-nitro-sqlite
#602
Conversation
mountiny
left a comment
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.
Can this be used with App that is not yet migrated the the nitro-sqlite?
|
@chrispader let @dominictb know when this si ready for testing and checklist |
|
@chrispader does @dominictb need to use Expensify/App#53149 with these changes? |
@mountiny I've already migrated E/App too in Expensify/App#53149. The changes could technically already be used, but i would hold on this PR to be merged first, so we can just bump the Onyx version in E/App instead of using a git commit. |
yes, i just added a note to |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2024-11-29.at.15.10.39-compressed.movMacOS: Desktop |
|
Just tested a number of flows and no problem so far 😄 Only 1 question above ^ and we're good to 🚀. @chrispader Don't forget to fill your Author Checklist. |
|
@chrispader Any update? |
|
I'm pretty busy with other tasks this week, will look into this next monday |
I currently cannot reproduce this since i have no bank account/wallet set up. This is a SQLite internal error, which should not be possible, since we never use transactions and rollbacks, but i'll have to look into this deeper once i have the bank account set up and i am able to click on "Pay with Expensify". |
|
@chrispader You can follow the credential here 🧵 to connect to a bank account for a workspace. |
I cannot reproduce this. Do you have any specific repro steps for this? Does this warning appear right after you click the "Pay with Expensify" button? Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-12-17.at.16.45.12.mp4 |
|
@dominictb please let us know if you can still reproduce this |
react-native-nitro-sqlitereact-native-nitro-sqlite
react-native-nitro-sqlitereact-native-nitro-sqlite
react-native-nitro-sqlitereact-native-nitro-sqlite
|
@dominictb @mountiny this is ready for review and the prerequisite for Expensify/App#53149 |
|
Code changes overall look good. I'll rebuild today after completing other tasks (not to waste time rebuilding) to see if there's any runtime errors. |
dominictb
left a comment
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.
![]()
|
@chrispader Can you pull |
done! @dominictb |
mountiny
left a comment
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.
Thanks! changes look good to me, tests should cover the main logic
|
@fabioh8010 @rlinoz do you want to review? |
rlinoz
left a comment
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.
Looks good to me!
fabioh8010
left a comment
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.
Changes are simple and look good to me! I have some questions though:
- I know it's not the main goal of the issue, but I'm curious if we have any kind of performance improvements by using
react-native-nitro-sqlitenow? If yes, could you provide some info? - Do we need to think about a migration strategy here? Or everything is supposed to work same as before when using the new package? I'm more concerned about logged in users with stored data before/after this update.
- Related to above, @chrispader I really appreciate if you add some manual tests around the App and provide videos for all platforms proving that this change is safe to ship 👍
|
@chrispader How is it going? |
Thanks for the feedback!
There definitely shouldn't be worse performance than before, since our benchmarks indicated that NitroSQLite was always faster than the QuickSQLite due to performance gains from Nitro Modules.
cc @dominictb |
|
@chrispader what are we missing here? |
@rlinoz i don't think there's anything missing here, as long as testing and review are good i'm not on my macbook right now, will try to resolve conflicts later today |
|
@rlinoz merge conflicts resolved, this should be ready to go! |

@mountiny
Details
This PR migrates Onyx to use
react-native-nitro-sqliteinstead ofreact-native-quick-sqlite.There are only some minor changes to the types and usages of some operations, so there are no major logic changes.
Nitro now allows generic type parameters for
executeandexecuteAsyncand also includes general improvements to the API.Related Issues
$ Expensify/App#53063
Automated Tests
No new tests needed. No changes in logic.
Manual Tests
In order to test this PR in E/App use this branch
Author Checklist
### Related Issuessection aboveTestssectiontoggleReportand notonIconClick)myBool && <MyComponent />.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Avataris modified, I verified thatAvataris working as expected in all cases)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