Fix empty tail partitions - #302
Open
ychampion wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--partitionbucket selection so later partitions do not go empty when earlier buckets round up.--feature-powerset --partition 5/5case from--partition N/Mdoesn't distribute jobs properly #287.Why
Fixes #287. With 11 generated runs and 5 partitions, the old
ceil(total / partitions)bucket size assigned the first 9 runs to partitions 1-3, the final 2 runs to partition 4, and left partition 5 empty.Validation
/root/oss/cargo-hack/target/debug/cargo-hack hack check --feature-powerset --partition 5/5 --print-command-listfromtests/fixtures/powerset_deduplication— printed the final two commands for partition 5 after the fixcargo test partition --test test -- --nocapture— passedcargo test --bin cargo-hack— passedcargo test --test test -- --skip multi_target --skip rust_version --skip version_range --skip version_range_failure— passedcargo clippy --all-targets --all-features -- -D warnings— passedcargo +nightly fmt --all -- --check— passedgit diff --check— passedcargo test— did not complete locally because this host is out of disk while rustup downloads old toolchains for the rustup-dependent version/target tests