-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix the setupNode action failing on npx patch-package
#25988
Conversation
@Julesssss 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] |
@mountiny @adamgrzybowski Please review this whenever you have time and create an issue for completeness |
The test build when |
The test build when trying to commit something without any changes to |
This build mimics Although this was due to a bug in earlier implementation |
Cc @adamgrzybowski @staszekscp could you check this out please |
@shubham1206agra thanks for the pr, can you please describe why it was failing and what you are doing to fix it? Add it to the details of the pr |
Thanks for the catch and the PR! After giving it a thought, I think that in this case we could entirely remove |
I think time was the constraint here cause fresh installation takes time and someone wants to speed test the jest unit test, and if any patch file changes then the author has to wait extra time to confirm the results. |
The original action has 2 problems
Due to missing |
@staszekscp Can you create an issue for completeness for this? |
@staszekscp @adamgrzybowski friendly bump |
I think that actually it would be safer to reinstall |
Looks like removing the patch looks like a legitimate issue. Should I change the code now or wait for more thoughts? |
In the meanwhile, can you please create an issue for the same? |
Actually I am not a member of Expensify, so I'm not sure, should I be the person that creates the issue 😄 Maybe @mountiny could do that if that's necessary 😄 ? |
@shubham1206agra Can you please change the code now? |
Created an issue #26101 @roryabraham could you please help us with a review here 🙇 |
@shubham1206agra Can you please comment on the linked issue Can you also please create the PR we had to revert again? Then I could try to run the adhoc build using this workflow on that Pr with a patch to confirm the setupNode action will succeed |
Already reopened #25989 |
@shubham1206agra thanks! Validate GH actions, github action |
There is no diff by running the command. What should I do? |
@shubham1206agra try this:
|
@@ -29,36 +29,27 @@ runs: | |||
shell: bash | |||
run: | | |||
set -e | |||
if [[ `git diff main --name-only | grep \.patch` != null ]]; then | |||
git fetch origin main --no-tags --depth=1 |
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.
We did not have to fetch here before. Why did we add this?
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.
The problem can be seen in this job. In this job, the git diff fails with the following
fatal: ambiguous argument 'main': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
Due to missing main branch in gh checkout. And it somehow sets CHANGES_IN_PATCH_FILES to true, which is running npx patch-package even if there are no changes in patch files.
Validate gh actions gave out so much diff |
@roryabraham bump on the above if you could respond to @shubham1206agra please thank you! |
@roryabraham Please review now |
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, that's much simpler 🙂
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
Congrats, that’s your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It’s an opportunity to earn more in the Expensify Open Source community. Keep up the great work - thanks! |
✋ 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/roryabraham in version: 1.3.61-0 🚀
|
@mountiny @roryabraham Can you please QA this internally |
All good, worked well |
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.61-3 🚀
|
Details
Fixed Issues
$ #26101
Tests / QA Steps
.patch
files. It should use cache and should not runnpm ci
.patch
files. It should runnpm ci
in this case.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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android