Page MenuHomePhabricator

Implement support for leasing from Drydock hosts in Harbormaster
ClosedPublic

Authored by hach-que on Dec 5 2013, 1:34 AM.
Tags
None
Referenced Files
F14056684: D7706.diff
Sat, Nov 16, 9:42 PM
F14052604: D7706.id17407.diff
Fri, Nov 15, 9:35 AM
F14052601: D7706.id17406.diff
Fri, Nov 15, 9:35 AM
F14052600: D7706.id.diff
Fri, Nov 15, 9:35 AM
F14052599: D7706.diff
Fri, Nov 15, 9:35 AM
F14033674: D7706.id17406.diff
Sat, Nov 9, 7:07 PM
F14033392: D7706.id.diff
Sat, Nov 9, 5:35 PM
F14032880: D7706.id.diff
Sat, Nov 9, 4:05 PM

Details

Summary

This adds LeaseHostBuildStepImplementation for getting leases on hosts in Drydock via Harbormaster. It stores the resulting lease in an artifact.

There is also a few bug fixes as well.

Test Plan

Created a build plan with a "Lease Host" build step. Ran the build plan and saw the build pass and the artifact in the database.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

src/applications/harbormaster/step/BuildStepImplementation.php
59–70

We need to load settings against either HarbormasterBuildStep or HarbormasterBuildTarget.

src/applications/harbormaster/storage/configuration/HarbormasterBuildStep.php
44–62

Need this back in HarbormasterBuildStep in addition to HarbormasterBuildTarget since we need to be able to create implementations in the build plan editor (where there's no targets).

epriestley added inline comments.
src/applications/harbormaster/step/BuildStepImplementation.php
59–70

Maybe cleaner to provide loadSettingsFromBuildTarget and loadSettingsFromBuildStep, but this is easy to clean up later.

src/applications/harbormaster/storage/configuration/HarbormasterBuildPlan.php
45

Prefer the verb load to get, so it's more clear that the method does service calls.

src/applications/harbormaster/storage/configuration/HarbormasterBuildStep.php
44–62

We should maybe do dummy targets or something, but not a big deal to sort out later.