HomePhabricator

Allow demoted builds to automatically promote if builds pass after a restart

Description

Allow demoted builds to automatically promote if builds pass after a restart

Summary:
Ref T13124. See PHI584. When you create a draft revision and it automatically demotes to "Changes Planned + Draft" because builds fail, let it promote to "Needs Review" automatically if builds pass. Usually, this will be because someone restarted the builds and they worked the second time.

Although I'm a little wary about adding even more state transitions to the diagram in T13110#237736, I think this one is reasonably natural and not ambiguous.

Test Plan:

  • Created a failing build plan with a "Throw Exception" step.
  • Created a revision which hit the build plan, saw it demote to "Changes Planned" when Harbormaster failed.
  • Edited the build plan to remove the "Throw Exception" step, restarted the build, got a pass.
  • Saw revision promote again:

Screen Shot 2018-04-17 at 4.03.00 PM.png (393×706 px, 53 KB)

I didn't exhaustively test that the other 40 state transitions still work properly, but I think the scope of this change is small enough that it's unlikely I did much collateral damage.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13124

Differential Revision: https://secure.phabricator.com/D19380

Details