Page MenuHomePhabricator

In "bin/drydock lease", take a JSON "--attributes" so we can accept complex values

Authored by epriestley on Oct 24 2018, 2:22 PM.



Depends on D19750. See T13210. The bin/drydock lease command makes it easier to request ad-hoc leases, but currently takes lease attributes in the form --attributes x=y,a=b.

This was okay for all leases at the time, but doesn't really work for modern WorkingCopy resources since they take a which has a dictionary as a value. You can't specify that with

Instead, point --attributes at a JSON file or use --attributes - to read from stdin.

Test Plan

Used --attributes with a file and stdin to allocate working copy leases with repositories.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Oct 24 2018, 2:22 PM
Owners added a subscriber: Restricted Owners Package.Oct 24 2018, 2:22 PM
epriestley requested review of this revision.Oct 24 2018, 2:23 PM
amckinley accepted this revision.Oct 26 2018, 1:44 AM
This revision is now accepted and ready to land.Oct 26 2018, 1:44 AM
This revision was automatically updated to reflect the committed changes.