Title
#general
h

Harshul Goel

11/23/2022, 10:59 PM
Hi, I ran infracost using github actions and got this error on github, my repo is really huge but is there a way to avoid this?
11:07 PM
Alistair (Infracost)

Alistair (Infracost)

11/24/2022, 9:23 AM
Hi @Harshul Goel. I’ve not seen this before. Can you try the example that doesn’t use the cache? https://github.com/infracost/actions/tree/master/examples/terraform-project
h

Harshul Goel

11/25/2022, 2:44 PM
Hi Alistair, thanks for responding. I tried running the example without the cache and ran into the same problem
Alistair (Infracost)

Alistair (Infracost)

11/25/2022, 2:49 PM
Hmm… are there any more logs or information if you run it in debug mode? Also, is this the only job that runs in the workflow?
h

Harshul Goel

11/25/2022, 4:47 PM
When I run it in debug mode I see normal logs and no error message
4:49 PM
Other jobs do run but this latest run was just ran alone
Alistair (Infracost)

Alistair (Infracost)

11/25/2022, 4:53 PM
How big is your repo? The action works by checking out the base branch and then the PR branch, so maybe there’s something we could do to clean up between those check outs.
h

Harshul Goel

11/25/2022, 5:01 PM
The repo is huge, ~60 environments, maybe more
Alistair (Infracost)

Alistair (Infracost)

11/25/2022, 5:01 PM
do you know how many GB?
h

Harshul Goel

11/25/2022, 5:05 PM
Not sure about that but the debug log file that I got is over 500mb and the action ran for ~50 mins before erroring out
Alistair (Infracost)

Alistair (Infracost)

11/25/2022, 5:06 PM
and the action ran for ~50 mins before erroring out
was this the same error as above?
h

Harshul Goel

11/25/2022, 5:07 PM
Yea same
5:07 PM
Also it fails while establishing the baseline doesn't even get to checkout the PR branch
Alistair (Infracost)

Alistair (Infracost)

11/25/2022, 5:08 PM
On this step? “Generate Infracost cost estimate baseline”
h

Harshul Goel

11/25/2022, 5:08 PM
Yes
Alistair (Infracost)

Alistair (Infracost)

11/25/2022, 5:08 PM
Okay, do you use a lot of remote modules?
h

Harshul Goel

11/25/2022, 5:09 PM
Yes we do
Alistair (Infracost)

Alistair (Infracost)

11/25/2022, 5:14 PM
Okay, it might be when we download them then it runs out of space. Looks like GitHub Actions gives you 14 GB of space, so I’m surprised that’s running out. One idea for a workaround is to use a matrix build to run it for different subdirectories, and then combine the results and post a single comment. I can have a look at working out an example for that.
h

Harshul Goel

11/25/2022, 5:17 PM
Ah ok I see what you mean, thank you so much for the help, really appreciate it!