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
Unknown Object (File)
Sun, May 28, 5:21 AM
Unknown Object (File)
May 7 2023, 5:00 AM
Unknown Object (File)
May 3 2023, 2:11 AM
Unknown Object (File)
Apr 8 2023, 9:00 PM
Unknown Object (File)
Apr 8 2023, 9:47 AM
Unknown Object (File)
Apr 6 2023, 1:37 AM
Unknown Object (File)
Apr 3 2023, 9:02 PM
Unknown Object (File)
Mar 27 2023, 11:52 PM



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.