https://infracost.io logo
Title
f

fancy-scientist-81076

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?
l

little-author-61621

11/24/2022, 9:23 AM
Hi @fancy-scientist-81076. 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
f

fancy-scientist-81076

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
l

little-author-61621

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?
f

fancy-scientist-81076

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

little-author-61621

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.
f

fancy-scientist-81076

11/25/2022, 5:01 PM
The repo is huge, ~60 environments, maybe more
l

little-author-61621

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

fancy-scientist-81076

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
l

little-author-61621

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

fancy-scientist-81076

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

little-author-61621

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

fancy-scientist-81076

11/25/2022, 5:08 PM
Yes
l

little-author-61621

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

fancy-scientist-81076

11/25/2022, 5:09 PM
Yes we do
l

little-author-61621

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.
f

fancy-scientist-81076

11/25/2022, 5:17 PM
Ah ok I see what you mean, thank you so much for the help, really appreciate it!
Hi @little-author-61621, I ran the matrix build with just 2 envs but just a single environment ran for 30 minutes before failing. What is the best way to handle large mono repos?
l

little-author-61621

11/30/2022, 9:23 AM
Hi @fancy-scientist-81076 my best guess is it’s taking the time downloading external modules, but 30 mins sounds like a long time. I’d be happy to pair with you on Zoom to help debug. You can schedule something with me here to suit you if that helps: https://calendly.com/aiscott.