-
Notifications
You must be signed in to change notification settings - Fork 0
support suite-based queueing #47
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
base: ebarajas/support-ordering-strategies
Are you sure you want to change the base?
support suite-based queueing #47
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
243cd93
to
ee83285
Compare
9a1776f
to
2818672
Compare
57648bc
to
5f85a15
Compare
|
||
# Separate chunks from individual tests | ||
chunks = executables.select { |e| e.is_a?(CI::Queue::TestChunk) } | ||
individual_tests = executables.select { |e| !e.is_a?(CI::Queue::TestChunk) } |
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.
Conceptually, wondering if we should just stop using individual tests as a first class element in the queue, and just always use TestChunk. (An individual test can also be wrapped into a TestChunk).
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.
The benefit is whenever we interact with an item from the queue, we have a single interface to deal with.
@index = tests.map { |t| [t.id, t] }.to_h | ||
tests = Queue.shuffle(tests, random, config: config) | ||
push(tests.map(&:id)) | ||
executables = Queue.shuffle(tests, random, config: config) |
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.
nit: I think "shuffle" (and the underlying "order_tests") now does more than reordering. Maybe we should rename this?
Or maybe separate to two function calls?
tl;dr
Added a new
suite_bin_packing
test ordering strategy that groups tests by suite and optimizes execution time.What changed?
SuiteBinPacking
strategy that groups tests by test suite and creates "chunks" for executionTestChunk
class to represent groups of tests that should be executed togetherThe strategy uses test timing data to: