Page MenuHomePhabricator

Add a `bin/config set <key> --stdin < value.json` flag to make CLI configuration of complex values easier

Authored by epriestley on Feb 6 2018, 2:23 PM.
Referenced Files
F13436284: D19004.diff
Thu, Jul 11, 8:31 AM
F13390271: D19004.id45569.diff
Tue, Jul 2, 2:28 AM
F13389161: D19004.diff
Mon, Jul 1, 5:09 PM
F13384464: D19004.id45603.diff
Sun, Jun 30, 4:35 PM
Fri, Jun 28, 4:15 PM
F13372921: D19004.diff
Fri, Jun 28, 3:47 PM
F13346569: D19004.id45603.diff
Fri, Jun 21, 4:56 PM
Thu, Jun 20, 7:34 AM



Depends on D19003. Ref T12677. Ref T13053. For the first time, we're requiring CLI configuration of a complex value (not just a string, integer, bool, etc) to do something fairly standard (send mail).

Users sometimes have very reasonable difficulty figuring out how to ./bin/config set key <some big JSON mess>. Provide an easy way to handle this and make sure it gets appropriate callouts in the documentation.

(Also, hide the cluster.mailers value rather than just locking it, since it may have API keys or SMTP passwords.)

Test Plan

Read documentation, used old and new flags to set configuration.

Diff Detail

rP Phabricator
Lint Not Applicable
Tests Not Applicable

Event Timeline


Looks good other than locked/hidden question. Thanks for building this!!


Shouldn't this be both hidden and locked, based on the docs below?

This revision is now accepted and ready to land.Feb 7 2018, 7:48 PM

It's not really obvious from the code, but setHidden() implies setLocked() -- at least for now, we don't have a "write-only" version of the UI (where you can edit but not see the value) or anything since it doesn't actually make sense for any option. (And hopefully we never need to have this, but who knows.) Upshot is: setHidden() also locks it.

This revision was automatically updated to reflect the committed changes.