Skip to content

Fix empty tail partitions - #302

Open
ychampion wants to merge 2 commits into
taiki-e:mainfrom
ychampion:fix-partition-bucket-distribution
Open

Fix empty tail partitions#302
ychampion wants to merge 2 commits into
taiki-e:mainfrom
ychampion:fix-partition-bucket-distribution

Conversation

@ychampion

Copy link
Copy Markdown

Summary

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-list from tests/fixtures/powerset_deduplication — printed the final two commands for partition 5 after the fix
  • cargo test partition --test test -- --nocapture — passed
  • cargo test --bin cargo-hack — passed
  • cargo test --test test -- --skip multi_target --skip rust_version --skip version_range --skip version_range_failure — passed
  • cargo clippy --all-targets --all-features -- -D warnings — passed
  • cargo +nightly fmt --all -- --check — passed
  • git diff --check — passed
  • cargo test — did not complete locally because this host is out of disk while rustup downloads old toolchains for the rustup-dependent version/target tests

Copilot AI review requested due to automatic review settings July 8, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--partition N/M doesn't distribute jobs properly

2 participants