HomePhabricator

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

Description

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

Summary:
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 repositories.map which has a dictionary as a value. You can't specify that with repositories.map=....

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.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Differential Revision: https://secure.phabricator.com/D19751

Details