-
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] Fail patch-package on errors or warnings #44589
Conversation
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
setupNode
will fail atnpm ci
as 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-package
fails 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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