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.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 10:40 AM
Unknown Object (File)
Tue, Apr 2, 4:47 PM
Unknown Object (File)
Thu, Mar 28, 12:33 PM
Unknown Object (File)
Sat, Mar 23, 12:38 PM
Unknown Object (File)
Sat, Mar 23, 5:02 AM
Unknown Object (File)
Sat, Mar 23, 5:02 AM
Unknown Object (File)
Feb 27 2024, 4:33 PM
Unknown Object (File)
Feb 12 2024, 12:36 AM
Subscribers
None

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
Branch
mailer5
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 19362
Build 26178: Run Core Tests
Build 26177: arc lint + arc unit

Event Timeline

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.