Page MenuHomePhabricator

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

Authored by epriestley on Feb 6 2018, 2:23 PM.

Details

Summary

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

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

Event Timeline

epriestley created this revision.Feb 6 2018, 2:23 PM
epriestley requested review of this revision.Feb 6 2018, 2:24 PM
amckinley accepted this revision.Feb 7 2018, 7:48 PM

itsawesome

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

src/applications/config/option/PhabricatorMetaMTAConfigOptions.php
205

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.