[No QA] Fail patch-package on errors or warnings#44589
Conversation
There was a problem hiding this comment.
This patch version matched, it just ended in .patch.patch for some reason. Renamed it to just .patch and that worked.
There was a problem hiding this comment.
Renamed without changes. Created upstream PR, which was missing: Expensify/react-native-live-markdown#406
|
@parasharrajat 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] |
|
No C+ review needed here. |
|
@parasharrajat 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] |
scripts/verifyPatches.sh
Outdated
|
|
||
| # Run patch-package and capture its output and exit code | ||
| TEMP_OUTPUT="$(mktemp)" | ||
| npx patch-package --error-on-fail 2>&1 | tee "$TEMP_OUTPUT" |
There was a problem hiding this comment.
Using tee so that you can see the original output in the workflow
|
Reassure failure is a temporary issue (installing on an older version of the code that has warnings on patch-package). I think we can ignore it |
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/AndrewGable in version: 9.0.4-0 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/tgolen in version: 9.0.4-5 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.6-8 🚀
|
|
I definitely linked the wrong issue here 😅 |
Details
This PR adds a PR check that verifies all patches in are applied cleanly by patch-package. This ensures that we don't upgrade a dependency and break a patch without noticing, or keep a patch that is no longer needed. Hopefully this will help keep our patches a bit more in-control. We have a lot of them.After a timely slack discussion, the approach in this PR has been simplified a bit. Instead of adding a new PR check, this PR just adds a wrapper script around patch-package that will fail if there's an error or warning, and runs that script in
postInstall.sh.This will act as a PR check, because any action (such as test or lint) using
setupNodewill fail atnpm cias well. But it also prevents developers from making the mistake locally or missing that one of their patches is broken, which is easy to miss and can lead to errors in the dev environment that wastes time.Fixed Issues
$ #3677
Tests
patch-packagefails instead of warns.npm install, verify that it fails.npm install, verify that it fails.npm install, verify that it passes.Offline tests
None.
QA Steps
None.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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 and/or tagged@Expensify/designso 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