rollers: Check if roll is backwards
Backwards rolls never happened, but they caused infra failures when
running `git log $OLD..$NEW`. Now rollers check if the roll is in
reverse and marks the run as successful. This is needed because
occasionally LUCI config changes result in luci-scheduler thinking a
roller is new and triggering 30 rolls that all fail. Now they'll still
be triggered but they won't do anything and then they'll pass.
Added this logic to the roll_message module, which is now renamed to
roll_util.
Tested by retriggering a past successful roll.
$ led get-build 8868516989406765792 | led edit-recipe-bundle | \
led edit -p 'dry_run=true' | led launch
LUCI UI: https://ci.chromium.org/swarming/task/4ecf5393d5a23d10
Also tested by pausing a roller and manually triggering after another CL
went in.
$ led get-builder luci.pigweed.ci:pigweed-stm32-roller | \
led edit-recipe-bundle | led edit -p dry_run=true | led launch
LUCI UI: https://ci.chromium.org/swarming/task/4ed09708b7433d10
Change-Id: I057272a5221626312a96b195eccdaf9dd8dc053d
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/18683
Reviewed-by: Oliver Newman <olivernewman@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
27 files changed