Page MenuHomePhabricator

[Wilds] Prepare for more modular configuration management
ClosedPublic

Authored by epriestley on Sep 18 2018, 8:36 PM.

Details

Summary

Ref T13098. This is kind of a catch-all diff with stuff that didn't fit in prior diffs, and which fixes some bugs with that stuff now that I made it at least sort of reachable.

Beyond bugs, the general idea is to replace ConfigurationManager (a big class which knew about config-end-to-end) with a more modern/modular ConfigurationEngine using the standard Engine + EngineExtension modularity pattern.

Configuration becomes a ConfigurationSourceList of ConfigurationSource objects, each of which represents one source (a config file, --config x=y, etc). The various sources will have the logic to parse values (e.g., decode x=y flags or JSON files on disk). A new --config-file allows you to replace the system (/etc/arcconfig) and user (~/.arcrc) files.

This also gets rid of --library support entirely for now since it's kind of messy to bridge until Config works. I expect to either restore it or replace it with arc install and similar.

Test Plan

Ran arc liberate; it actually works now. (The Config stuff does not actually work yet.)

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 20860
Build 28372: Run Core Tests

Event Timeline

epriestley created this revision.Sep 18 2018, 8:36 PM
Harbormaster returned this revision to the author for changes because remote builds failed.Sep 18 2018, 8:36 PM
Harbormaster failed remote builds in B20860: Diff 47048!
epriestley requested review of this revision.Sep 18 2018, 9:10 PM
amckinley accepted this revision.Sep 20 2018, 5:32 PM

Why did these files get two different syntax highlighting treatments?

This revision is now accepted and ready to land.Sep 20 2018, 5:32 PM

The version and/or installation status of xhpast likely differs across nodes on the secure tier, so one file got highlighted by (say) secure001 and got a full XHPAST parse, while the other got highlighted by (say) secure003 and fell back to the Pygments lexer.

That code will need to be touched when libphutil/ vanishes anyway so I should be able to clean it up then.

This revision was automatically updated to reflect the committed changes.