Page MenuHomePhabricator

[Wilds] Prepare for more modular configuration management
ClosedPublic

Authored by epriestley on Sep 18 2018, 8:36 PM.
Tags
None
Referenced Files
F14013483: D19694.id.diff
Sat, Nov 2, 7:19 AM
F14003127: D19694.id47048.diff
Sat, Oct 26, 2:38 AM
F13984910: D19694.id47068.diff
Sun, Oct 20, 4:50 PM
F13963937: D19694.id.diff
Tue, Oct 15, 6:43 PM
Unknown Object (File)
Sun, Oct 13, 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.