Use the same logic in "bin/drydock lease" and LeaseUpdateWorker to identify candidate...
commit25cf955a89af096d90cce40d4c2efaee4ca40447
authorepriestley <git@epriestley.com>
Tue, 3 May 2022 21:24:26 +0000 (3 14:24 -0700)
committerepriestley <git@epriestley.com>
Tue, 3 May 2022 22:57:16 +0000 (3 15:57 -0700)
tree55d6c07f7ba2aa0d3f073e839531546b1f73cef9
parent30c3d1e92946e15f06c5d46b3d7f01184e8cac3c
Use the same logic in "bin/drydock lease" and LeaseUpdateWorker to identify candidate blueprints

Summary:
Ref T13676. Currently, "bin/drydock lease" just creates a lease that permits any blueprint.

To prepare for "use specific blueprint X", unify the logic between this workflow and LeaseUpdateWorker so we select only blueprints which at least have coarse compatibility (e.g., if we're leasing a host, only select enabled blueprints of classes that can allocate hosts).

Test Plan: Used `bin/drydock lease` to try to lease a nonsense type, got sensible error. Leased a host.

Subscribers: yelirekim, PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13676

Differential Revision: https://secure.phabricator.com/D21801
src/applications/drydock/blueprint/DrydockBlueprintImplementation.php
src/applications/drydock/management/DrydockManagementLeaseWorkflow.php
src/applications/drydock/worker/DrydockLeaseUpdateWorker.php