Skip to content
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

Fixed StagingDeployCash issue body #3772

Merged
merged 7 commits into from
Jun 29, 2021

Conversation

parasharrajat
Copy link
Member

Details

Added pagination so that all the automated PRs can be filtered while creating the StagingDeployCashBody issue Body.

Fixed Issues

$ fixes #3662

Tests

QA Steps

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

@parasharrajat parasharrajat requested a review from a team as a code owner June 27, 2021 20:37
@MelvinBot MelvinBot requested review from AndrewGable and removed request for a team June 27, 2021 20:37
@parasharrajat parasharrajat force-pushed the gh-action-DeployCashBody branch from 7e6bdfc to 37b9e7b Compare June 27, 2021 22:40
@parasharrajat
Copy link
Member Author

I think I need help with the Check here. I am not sure exactly why its failing, on local gh-action-validate has no errors.

@roryabraham
Copy link
Contributor

I think I need help with the Check here. I am not sure exactly why its failing, on local gh-action-validate has no errors.

TL;DR Just run npm run gh-actions-build and commit the changes 😄

But in case you want a more detailed explanation ...

So there are two checks that happen here. gh-action-validate uses a json schema to validate our .yaml GitHub actions and workflows to the best of its ability. That script is here.

The other check that happens here requires a bit more context. There is this subtlety of JavaScript GitHub Actions:

GitHub downloads each action run in a workflow during runtime and executes it as a complete package of code before you can use workflow commands like run to interact with the runner machine. This means you must include any package dependencies required to run the JavaScript code.

So in practice, that means that when creating a JavaScript action, one has two choices:

  1. Commit your node_modules (or at least, the subset used by your GitHub Actions)
  2. Precompile your JavaScript actions with their dependencies into a single Node.js executable using ncc.

We didn't want to commit any of our node modules in this repo, so instead we use the second approach. The build script is here. You can see the result by looking at all our JavaScript GitHub Actions, and you'll notice each has:

  1. An action metadata .yml file
  2. A JavaScript source file.
  3. A compiled JS file called index.js

So whenever changes are made to GH Actions, you need to recompile the GHA executables. In order to help prevent people forgetting to do that, we added another PR check here that executes this script. That script recompiles all the actions on the PR and will complain if there is diff, which is what is happening here:

image

@parasharrajat
Copy link
Member Author

Thanks for the detailed Info. but I built actions before pushing. I will try again.

@roryabraham
Copy link
Contributor

roryabraham commented Jun 28, 2021

@parasharrajat Do you have a windows computer? Annoyingly, ncc has different output on a windows machine vs a Unix machine. So windows users have to run the gh-actions-build in a vm, docker container, EC2 instance, or something.

@parasharrajat
Copy link
Member Author

parasharrajat commented Jun 28, 2021

No, Linux

@roryabraham
Copy link
Contributor

Try running .github/scripts/verifyActions.sh locally?

@parasharrajat
Copy link
Member Author

image

🤔

@roryabraham
Copy link
Contributor

Okay, next I would try this:

rm -rf node_modules
npm i
npm run gh-actions-build
./github/scripts/verifyActions.sh

Other than that, you have to look through the diff and try to find out what's going on/why there is a difference. IDK what Linux flavor you have, but that might matter - you could try running the build script in an Ubuntu 20.04 VM?

@parasharrajat
Copy link
Member Author

npm ci was it. Thanks for help.

@parasharrajat
Copy link
Member Author

Updated. Thanks.

roryabraham
roryabraham previously approved these changes Jun 29, 2021
Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers, just some small comments.

.github/libs/GithubUtils.js Outdated Show resolved Hide resolved
.github/libs/GithubUtils.js Outdated Show resolved Hide resolved
.github/libs/GithubUtils.js Show resolved Hide resolved
Co-authored-by: Rory Abraham <47436092+roryabraham@users.noreply.github.com>
@parasharrajat
Copy link
Member Author

Updated. Ready for review.

Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, LGTM 👍

@roryabraham roryabraham merged commit f78ced8 into Expensify:main Jun 29, 2021
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging in version: 1.0.74-1🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@parasharrajat parasharrajat deleted the gh-action-DeployCashBody branch November 4, 2022 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement better pagination for our GitHub Actions
3 participants