Reland swarming's optional_dimensions support in recipes.

This is a partial revert of crrev.com/c/2341673.

From the code that was originally deleted, it keeps:
- Code that plumbs 'optional_dimensions' from pyl testing specs down
  to the chromium_swarming.api.SwarmingTask object class.

It doesn't keep:
- Code that adds the "--optional-dimensions" arg to
  `swarming.py trigger` invocations. We're transition things to the
  golang swarming CLI. So it's code that would end up being deleted
  anyway.

It adds:
- Code that adds additional task slices for tests that specify
  optional_dimensions when using the golang swarming CLI.

Bug: 1132206
Change-Id: I7b2291be4799538f1dec05acb1c50429693acac7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/2441447
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Garrett Beaty <gbeaty@chromium.org>
4 files changed
tree: fc9e7f0af2a17a9f144957bf59f5e21e91ebbf0b
  1. infra/
  2. recipes/
  3. scripts/
  4. site_config/
  5. third_party/
  6. .gitattributes
  7. .gitignore
  8. .style.yapf
  9. .vpython
  10. .yapfignore
  11. codereview.settings
  12. CROS_OWNERS
  13. DEPS
  14. environment.cfg.py
  15. LICENSE
  16. OWNERS
  17. PRESUBMIT.py
  18. README.md
  19. WATCHLISTS
README.md

Recipes

If you're here to make a change to ‘recipes’ (the code located in scripts/slave/recipes*), please take a look at the README for more information pertaining to recipes.

Style

The preferred style is PEP8 with two-space indent; that is, the Chromium Python style. Functions use lowercase_with_underscores, with the exception of the special functions RunSteps and RunTests in recipes. Use yapf (git cl format --no-clang-format) to autoformat new code.