-
Notifications
You must be signed in to change notification settings - Fork 150
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
Could a parallelism/multi-thread feature be introduced? #460
Comments
Thanks for reporting this Euegene. May I please learn the version of terraform-compliance you are trying with ? Thanks! |
Absolutely! This is on the latest docker version, v1.3.13. |
Hi @eugeneromero, 4 minutes for running a whole test is simply too much. In order to understand the root cause, is it possible to transfer that There must be a small detail somewhere where we allocate unnecessary resources, but hard to guess without having a debugging session. |
Hey @eerkunt, yes, that could work. Here's a Google Drive link: Thanks again! |
Hi @eugeneromero, Tried your plan against all features in https://github.com/terraform-compliance/user-friendly-features.git, everything ran in 4 seconds. Maybe the problem is somewhere within the features, is it possible to share the features ? |
For sure! here is a link to those: https://drive.google.com/file/d/1Qcb1Yo4sVRR7HUn-hjS23aSTj0qClyg_/view?usp=sharing |
Thanks I can reproduce the problem right now :) |
Thanks, will release the fix upon merge with I observed 20x performance upgrade. Initial run was around 240 seconds based on your plan & features. Now its around 10-12 seconds. |
That is wonderful! I look forward to testing out the new version. Thank you for your support with this issue @eerkunt! |
@eugeneromero with the change happened in 1.3.20 (#516 & #192) when you update Please install it via |
Thank you for the warning @eerkunt!. We use
|
oh if you are using the docker image, then nothing is required. Its already embedded there :) |
Even better :D Thank you! |
Feature Request
Ideally, a flag which, when passed, allowed
terraform-compliance
to run with some sort of multithreading. This would mostly be for perfomance reasons.Feature description :
The way I envision it,
terraform-compliance
could first see the total amount of tests to run, split them evenly between the amount of "instances" specified, run all instances in parallel, then "reconcile" the results at the end to present a single, unified list of results as it does now.The reason for this request is that
terraform-compliance
seems to run very slow with certain tests, and being able to run multiple instances might be a good way overcome this limitation. As an example, we have one set of tests which is not particularly huge, butterraform-compliance
takes a good 3 minutes to parse through all of the tests:The terraform plan json file its iterating upon, is ~12,500 lines total. So, big, but not huge. When our average pipeline duration is ~4 minutes, this test almost doubles that. Splitting the job into multiple instances might be a simple way of speeding this up.
Suggested Solution description ( if you have any ) :
Something along the lines of
terraform-compliance
-j / --jobs
or-t / --threads
which would take an integer as input.Describe alternatives you've considered :
I considered running multiple instances of terraform-compliance manually, but this would not work since there is no way of splitting the "job" between them.
The text was updated successfully, but these errors were encountered: