HomePhorge

Use the same logic in "bin/drydock lease" and LeaseUpdateWorker to identify…

Description

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

Details

Provenance
epriestley <git@epriestley.com>Authored on May 3 2022, 21:24
aviveyPushed on Tue, Jul 26, 15:02
aviveyPushed on Tue, Jul 26, 15:01
Differential Revision
D25040: merge phab/master -> phorge/master
Parents
rP30c3d1e92946: Allow "bin/drydock lease" to acquire many identical leases with "--count N"
Branches
Unknown
Tags
Unknown
Tasks
T15094: Catch up the master branch to upstream