@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Show an info view warning for ongoing or failed builds in Differential

Summary:
Fixes T10136. This reinforces ongoing or failed builds in the comment action area.

We already emit a similar message for unit test failures from `arc unit`. This should probably obsolete that, eventually.

Test Plan:
{F2304809}

{F2304810}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10136

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

+24 -2
+24 -2
src/applications/differential/customfield/DifferentialUnitField.php
··· 32 32 } 33 33 34 34 public function getWarningsForDetailView() { 35 - $status = $this->getObject()->getActiveDiff()->getUnitStatus(); 35 + $warnings = array(); 36 + 37 + $viewer = $this->getViewer(); 38 + $diff = $this->getObject()->getActiveDiff(); 36 39 37 - $warnings = array(); 40 + $buildable = id(new HarbormasterBuildableQuery()) 41 + ->setViewer($viewer) 42 + ->withBuildablePHIDs(array($diff->getPHID())) 43 + ->withManualBuildables(false) 44 + ->executeOne(); 45 + if ($buildable) { 46 + switch ($buildable->getBuildableStatus()) { 47 + case HarbormasterBuildable::STATUS_BUILDING: 48 + $warnings[] = pht( 49 + 'These changes have not finished building yet and may have build '. 50 + 'failures.'); 51 + break; 52 + case HarbormasterBuildable::STATUS_FAILED: 53 + $warnings[] = pht( 54 + 'These changes have failed to build.'); 55 + break; 56 + } 57 + } 58 + 59 + $status = $this->getObject()->getActiveDiff()->getUnitStatus(); 38 60 if ($status < DifferentialUnitStatus::UNIT_WARN) { 39 61 // Don't show any warnings. 40 62 } else if ($status == DifferentialUnitStatus::UNIT_AUTO_SKIP) {