@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.

Delete artifacts when restarting build

Summary: Fixes T4336. This updates the build engine to delete all artifacts when targets are being deleted. This prevents conflicts when builds are restarted.

Test Plan: Restarted a build that had a lease host step and it didn't crash.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4336

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

authored by

James Rhodes and committed by
epriestley
51c4f697 e9be9ecf

+16
+16
src/applications/harbormaster/engine/HarbormasterBuildEngine.php
··· 101 101 ->setViewer($this->getViewer()) 102 102 ->withBuildPHIDs(array($build->getPHID())) 103 103 ->execute(); 104 + 105 + if (!$targets) { 106 + return; 107 + } 108 + 109 + $target_phids = mpull($targets, 'getPHID'); 110 + 111 + $artifacts = id(new HarbormasterBuildArtifactQuery()) 112 + ->setViewer($this->getViewer()) 113 + ->withBuildTargetPHIDs($target_phids) 114 + ->execute(); 115 + 116 + foreach ($artifacts as $artifact) { 117 + $artifact->delete(); 118 + } 119 + 104 120 foreach ($targets as $target) { 105 121 $target->delete(); 106 122 }