Prepare for a global --shard flag.

Review Request #3560 - Created March 10, 2016 and submitted

Information
Benjy Weinberger
pants
Reviewers
pants-reviews
patricklaw, stuhood, zundel

- Refactor shard spec parsing and application to a common utility.

- Rename test.pytest's --shard to --test-shard (and deprecate the
old name) so it won't collide with the global name, and for
uniformity with test.junit's similar flag.

Note that the name --test-shard is slightly awkward, because
'test' is the name of a scope, so using the short form in the
'test.pytest' context won't work. But I stuck with that name
for uniformity with test.junit, and because this is a wider
problem we need to think about anyway.

When global sharding is implemented, the test tasks' sharding will
subshard on top of that. This is useful because sharding the input
targets may not be fine-grained enough (some repos have large numbers
of tests covered by a single target). However global sharding
may be good enough in many cases, and will prevent us from having
to implement sharding over and over again in every task that might
need it.

Note: Replaces https://rbcommons.com/s/twitter/r/3363/, which is now
discarded.

CI passes: https://travis-ci.org/pantsbuild/pants/builds/115140711

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Eric Ayers
Benjy Weinberger
Review request changed

Status: Closed (submitted)

Change Summary:

d323c65240afc7a47c7c42fdcadb57d70fab1157

Benjy Weinberger

Thanks Eric! Submitted as d323c65240afc7a47c7c42fdcadb57d70fab1157.

Loading...