-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Tools] Parallel integration #289
base: main
Are you sure you want to change the base?
Conversation
Wow, 12 minutes to run, that's amazing! Thanks :) (not only Sorry for the chaotic message, I wanted to give you a quick feedback first! :) |
I can use |
That sounds great! I think that only what's failing should be kept, but maybe I am wrong. I guess that the more the better, in this sense. I would keep |
I made it upload the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of minor things, everything else looks good :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for implementing parallel execution! I'm also thrilled by the speedup!
tools/integration/run_integration.py
Outdated
self.parser.add_argument( | ||
"-w", "--workers", | ||
help="Number of workers to run in parallel for testing. Default is os.cpu_count()." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work?
self.parser.add_argument(
"-w", "--workers",
nargs="?",
type=int
help="Number of workers to run in parallel for testing. Default is os.cpu_count()."
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it does, thanks! I changed it for the timeout argument as well.
tools/integration/run_integration.py
Outdated
workers = None | ||
if args.workers: | ||
workers = int(args.workers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then you don't need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed
tools/integration/run_integration.py
Outdated
"-t", "--timeout", | ||
help="Custom timeout value for a single test. If not given, 500 seconds is used." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also can you specify the default timeout time here?
then you can remove the description from help
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the argument default=500
, but this does not automatically add it to the help description if I remove it.
tools/integration/run_integration.py
Outdated
# If timeout is not given, use default of 500 seconds | ||
timeout = int(args.timeout or 500) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then you don't need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
This PR improves the
run_integration.py
script by running integration tests in parallel, using Python'sProcessPoolExecutor
.By doing this, performance is significantly improved: local testing shows that all tests (besides the ones in
ignored_tests.txt
) are completed in around 4 minutes, unlike the current performance of the CI/CD workflow, which takes over an hour.