-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Parallelize Tests in CI (+ Refactor and Improvements) #21109
Parallelize Tests in CI (+ Refactor and Improvements) #21109
Conversation
|
We could re-write this PR to not include the heavy use of Azure DevOps templates. Which would make for smaller and more targeted changes, and be easier to review. Let us know; We'd be very glad to see this improvement land at this repo, so CI can run faster here. |
I don't think rewriting this is a good idea. They should merge #21081 before this. Not using templates just makes a soup of code that it is hard to maintain. |
7f73aae to
b3a8674
Compare
40b6de1 to
11b2361
Compare
|
@aminya I think this needs rebasing. |
cleanup process fails when the file is locked (in parallel tests)
Helps visually
e3a9b64 to
e9e6d81
Compare
only when needed
e9e6d81 to
82abb4d
Compare
|
@sadick254 This is ready to go! 😉 |
sadick254
left a comment
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.
@aminya Thank you for your contribution. Looking at this PR 2 questions come to mind.
- Does this affect the overall speed of running
script/test - What is the impact of spawning a
child_processfor every spec file?
Another thing i have noted is, this PR changes the behaviour of running script/test. This PR makes it mandatory to specify the suite one would like to run. Initially script/test would run all the core tests without extra args.
Thank you for asking. I haven't noticed any negative impact on performance. The speed bottleneck of running the tests is not in spawning the child_process (which might take less than 1 second), but in running the tests themselves. Using separate child_process allows us to selectively choose what we want to run, and rerun them if they fail (#21295). Using this I have improved the overall performance and test pass rate. With that being said there is still room for improvement. If you have noticed we use Without having these separately, running them in parallel is just impossible.
Yes, and I think this is a better approach. However, if you don't like this, it has an easy fix. Here instead of throwing an error, we can run all the tests: |
1d59c60 to
a9e690d
Compare
This increases the test-pass rate and reduced the timeouts #109
6af0d12 to
3dbe763
Compare
|
@aminya Thanks for the clarification.
No need. I think this is ok. 👍 |
Description of the Change
This:
Verification
The CI passes
Release Notes
Same as the description
Closes
This supersedes these old pull requests:
#18270