Page MenuHomePhabricator

D16324.diff
No OneTemporary

D16324.diff

diff --git a/src/applications/harbormaster/controller/HarbormasterPlanViewController.php b/src/applications/harbormaster/controller/HarbormasterPlanViewController.php
--- a/src/applications/harbormaster/controller/HarbormasterPlanViewController.php
+++ b/src/applications/harbormaster/controller/HarbormasterPlanViewController.php
@@ -91,6 +91,18 @@
->setNoDataString(
pht('This build plan does not have any build steps yet.'));
+ // Check if all build steps are valid first.
+ $all_build_steps_valid = true;
+ foreach ($steps as $phid => $step) {
+ try {
+ $step->getStepImplementation();
+ continue;
+ } catch (Exception $ex) {
+ $all_build_steps_valid = false;
+ break;
+ }
+ }
+
$i = 1;
$last_depth = 0;
$has_any_conflicts = false;
@@ -129,13 +141,23 @@
continue;
}
- $item->addAttribute($implementation->getDescription());
- $item->setHref($view_uri);
+ if (!$all_build_steps_valid) {
+ // We can't calculate dependencies if another plan is missing
+ // an implementation. Handle this scenario gracefully.
+ $item
+ ->setStatusIcon('fa-warning red')
+ ->addAttribute(pht(
+ 'Unable to calculate dependencies because steps are invalid.'));
+ continue;
+ }
$depends = $step->getStepImplementation()->getDependencies($step);
$inputs = $step->getStepImplementation()->getArtifactInputs();
$outputs = $step->getStepImplementation()->getArtifactOutputs();
+ $item->addAttribute($implementation->getDescription());
+ $item->setHref($view_uri);
+
$has_conflicts = false;
if ($depends || $inputs || $outputs) {
$available_artifacts =

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 14, 11:13 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7655336
Default Alt Text
D16324.diff (1 KB)

Event Timeline