Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15377881
D16324.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D16324.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D16324: Handle crash when build plan has mix of valid and invalid build steps
Attached
Detach File
Event Timeline
Log In to Comment