-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
CircleCI: run jobs in parallel #3634
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
Conversation
This is brilliant. Thanks for looking into this @antoinerg ! Before going any further, I'd like to get @bpostlethwaite 's approval. Off this branch, we have: that is, a max of 8 containers are running simultaneously and 4 of those containers set |
@etpinard this is a very valid concern that I was going to bring up to your attention. Little correction: I think we have 3 job with a One thing that concerned me was whether CircleCI would wait for 11 containers to be available to even start or would it execute each job sequentially if we're short on containers. I assume it does the latter but we should check to make sure our tests do not get queued up for long period of times. |
Yes this is fine. If we need more containers we'll buy them. Please let me know if there is significant queuing! |
@antoinerg looks like we have the green light 🚀 Before merging this thing, I noticed that the tests that get skipped are no longer logged. For example, in If I remember correctly, the plotly.js/test/jasmine/karma.conf.js Line 114 in 61fb58e
is responsible for this, along with its config object: plotly.js/test/jasmine/karma.conf.js Lines 247 to 257 in 61fb58e
I'm not sure how useful logging the skipped tests is. What do you think @antoinerg? Maybe we could add a CLI argument to allow devs to switch from var reporters = ['dots', 'spec'];
// to
var reportes = ['progress']; Thoughts? |
Oh one more thing too, at present we shouldn't have to split the So it would be nice, to bring all the pixel comparison tests into one container. Once that's done perhaps bump the parallelism to |
One big difference between them and "regular" mocks is that we render them in queue instead of in batch: Lines 37 to 38 in 12ce725
Out of curiosity, what makes you think the following warning may not apply anymore?
Anyway, I will test it out in a separate branch and let you know the result 😸 |
Good eye. Yeah, we shouldn't have to run the |
That one sounds obsolete. |
Done in 609cdf8 and seems to work fine. |
I think it is useful to show the skipped tests. I added a flag for it in b99672b. |
test/image/compare_pixels_test.js
Outdated
* More info here: | ||
* https://github.com/plotly/plotly.js/pull/1037 | ||
*/ | ||
function sortGl2dMockList(mockList) { |
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.
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 could reproduce this issue locally! Nice catch 👀
With be33648, I reintroduced sortGl2dMockList
and running npm run test-image
completed without error 🎉
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.
;; | ||
|
||
bundle) | ||
set_tz |
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.
⚡ - no need to set the timezone in containers that run image tests (they have their own timezone in their docker container).
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.
@etpinard would you please provide a pointer to 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.
Not sure what else can I say.
a thing of beauty. Thanks @antoinerg - looks like you're almost there! |
Amazing work! 💃 💃 Feel free to ignore #3634 (review) |
This PR is a follow-up to #3612 to try to improve the runtime of our test suite and its robustness.
Here we do so by leveraging the
parallelism
option offered in CircleCI. I moved outtest-bundle
into its own job and proceeded to runtest-jasmine
andtest-image
in parallel.The
test-image
routine had to modified for it to accept a list of mocks as command-line arguments (it used to only support one globbing pattern which wasn't suitable).I selected a parallelism of 2 for a few jobs in order for them to run in ~ 4 minutes. Because we need to

build
first (~ 2 minutes), we end up with a total running time of roughly 6 minutes: