HomePhabricator

Simply how Differential drafts ignore Harbormaster autobuilds

Authored by epriestley on Oct 20 2017, 6:20 PM.

Description

Simply how Differential drafts ignore Harbormaster autobuilds

Summary:
Ref T2543. When a revision is created, we check if any builds are waiting/failed, and submit it for review immediately if we aren't waiting for anything.

In doing this, we ignore builds with only autotargets, since these are client-side and failures from local arc lint / arc unit should not count (the user has already chosen to ignore/skip them).

The way we do this has some issues:

  • Herald may have started builds, but they may still be PENDING and not have any targets yet. In this case, we'll see "no non-autotargets" and ignore the build, which is wrong.
  • We have to load targets but don't really care about them, which is more work than we really need to do.
  • And it's kind of complex, too.

Instead, just let BuildQuery filter out "autobuilds" (builds generated from autoplans) with a JOIN.

Test Plan: Ran arc diff with builds configured, got a clean "Draft" state instead of an incorrect promotion directly to "Needs Review".

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T2543

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