Page MenuHomePhabricator

[Wilds] Prepare for more modular configuration management
ClosedPublic

Authored by epriestley on Sep 18 2018, 8:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 11:30 AM
Unknown Object (File)
Thu, Apr 11, 7:18 AM
Unknown Object (File)
Tue, Apr 9, 1:04 AM
Unknown Object (File)
Wed, Apr 3, 4:04 PM
Unknown Object (File)
Sat, Mar 30, 6:47 AM
Unknown Object (File)
Sat, Mar 30, 6:47 AM
Unknown Object (File)
Sat, Mar 30, 6:47 AM
Unknown Object (File)
Fri, Mar 29, 2:43 PM
Subscribers
None

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
Tests Skipped
Build Status
Buildable 20860
Build 28372: Run Core Tests

Event Timeline

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!

Why did these files get two different syntax highlighting treatments?

Screen Shot 2018-09-20 at 10.28.33 AM.png (882×2 px, 152 KB)

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.