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)
Sat, Nov 2, 7:19 AM
Unknown Object (File)
Sat, Oct 26, 2:38 AM
Unknown Object (File)
Oct 20 2024, 4:50 PM
Unknown Object (File)
Oct 15 2024, 6:43 PM
Unknown Object (File)
Oct 13 2024, 12:02 PM
Unknown Object (File)
Oct 9 2024, 10:11 AM
Unknown Object (File)
Sep 6 2024, 4:01 AM
Unknown Object (File)
Sep 6 2024, 4:01 AM
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

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.