Page MenuHomePhabricator

Almanac Service Blueprints does not create a lease folder
Closed, InvalidPublic

Description

The new Almanac Service Blueprint does not create lease folders and does not provide it on the command interface.
I fixed it, super-hackily by doing this:

diff --git a/src/applications/drydock/blueprint/DrydockAlmanacServiceHostBlueprintImplementation.php b/src/applications/drydock/blueprint/DrydockAlmanacServiceHostBlueprintImplementation.php
index 64c002b..eeff6fb 100644
--- a/src/applications/drydock/blueprint/DrydockAlmanacServiceHostBlueprintImplementation.php
+++ b/src/applications/drydock/blueprint/DrydockAlmanacServiceHostBlueprintImplementation.php
@@ -146,10 +146,16 @@ final class DrydockAlmanacServiceHostBlueprintImplementation
 
         $interface = $binding->getInterface();
 
-        return id(new DrydockSSHCommandInterface())
+        $cmd = id(new DrydockSSHCommandInterface())
           ->setConfig('credentialPHID', $credential_phid)
           ->setConfig('host', $interface->getAddress())
           ->setConfig('port', $interface->getPort());
+
+        $curdir = trim($cmd->execx('pwd')[0]);
+        $full_path = $curdir.'/'.$lease->getID();
+        $cmd->execx('ls %s || mkdir %s', $full_path, $full_path);
+
+        return $cmd->setWorkingDirectory($full_path);
     }
   }

Event Timeline

mikn updated the task description. (Show Details)
mikn added a project: Drydock.
mikn added a subscriber: mikn.
mikn renamed this task from Almanac Resource Blueprints does not create a lease folder to Almanac Service Blueprints does not create a lease folder.Sep 23 2015, 1:34 PM