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:
|
| 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.
We did not have to fetch here before. Why did we add this?
There was a problem hiding this comment.
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 |
roryabraham
left a comment
There was a problem hiding this comment.
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
.patchfiles. It should use cache and should not runnpm ci.patchfiles. It should runnpm ciin this case.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.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)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android