You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overall TODO generated by huge arse discussion thread.
Add new concepts doc on configuration, including a clearly marked hierarchy definition, and a big WARNING about how multiple files in same location w/ diff extensions are not merged.
Make sure to clarify .yaml, not .yml.
Probably also needs an update to the CLI docs section re: flags and env vars (new subsection)punting on user-driven config updates that aren't env vars; env vars have their own section in config so no need to duplicate
Re: env vars, need to figure out best way for user-driven config settings to work too, eventuallypunting
Brief mention of concepts doc in the tutorialActually don't see an elegant way to work it in - feels best just as a standalone regular concepts doc for now
Make sure API in docs gets updated to be consistent & 'modern' - e.g. obj['foo.bar'] should turn into obj['foo']['bar'] or ideally with the option of obj.foo.bar.
Update concepts/contexts to adapt, possibly paring it way down or removing entirely, tl;dr it's just about explaining how contexts perform shared state.
The 'nested collection configs get merged' explanation could still live here but probably lives better in the new config page, or the namespacing page if it exists.
Vendorize etcaetera
Use its Config object in place of Context's existing inner dicts, get tests passing again referencing it (it's dict-like).
Decide whether the current run/general/etc splits become sub-config objects or just nested namespaces within the primary config object
Leaning towards the latter so people can override them everywhere
Add new CLI flags for setting config options (primarily -f or whatnot for "specific config file")
Conf file loading of different extensions at the same 'location' is exclusive - no merging of eg /etc/invoke.yaml and /etc/invoke.json.
Debugging of conf option overrides must be easy
either via a no-op CLI flag showing what the tree would be for a given task module (or task invocation?), or
via regular debug output (ideally + a no-op option)
really, those go to the same place
If not covered in the previous point: it must be easy to troubleshoot stupid typos in config file paths.
e.g. if you accidentally created a /etc/invok.yaml, or fatfingered the arg to invoke -f <path> - it should be clear when running with -d which config files it attempted to load and which ones failed to load.
Main problem is that for the first 3-4 levels we have 3x file paths we end up searching for, so it will be somewhat verbose :( but no obvious solution offhand, better to add it to debug output (or some other level?) than try to be clever.
Update invocations to use this new setup instead of dotted names - they still technically work but are invalid for eg env var translation.
Context objects (& subclasses like Fabric2's Connection) need a clean API for this configuration stuff - either Context directly grows all the config related methods (perhaps becoming a etcaetera.Config subclass itself?) or it accepts some config object (again perhaps etc.Config) as an instance member.
The current driving need here is actually testing related, I need to inject a config value override or two in Connection tests.
Fill in any remaining skipped tests related to this feature set.
Original ticket description from sophacles
It would be nice to be able to pass context variables on the command line to invoke scripts. Something like:
Maintainer edits
Overall TODO generated by huge arse discussion thread.
.yaml, not.yml.Probably also needs an update to the CLI docs section re: flags and env vars (new subsection)punting on user-driven config updates that aren't env vars; env vars have their own section in config so no need to duplicateRe: env vars, need to figure out best way for user-driven config settings to work too, eventuallypuntingBrief mention of concepts doc in the tutorialActually don't see an elegant way to work it in - feels best just as a standalone regular concepts doc for nowobj['foo.bar']should turn intoobj['foo']['bar']or ideally with the option ofobj.foo.bar.concepts/contextsto adapt, possibly paring it way down or removing entirely, tl;dr it's just about explaining how contexts perform shared state.etcaeteraConfigobject in place ofContext's existing inner dicts, get tests passing again referencing it (it's dict-like).-for whatnot for "specific config file")cli flags+ in-module configs/etc/invoke.yamland/etc/invoke.json./etc/invok.yaml, or fatfingered the arg toinvoke -f <path>- it should be clear when running with-dwhich config files it attempted to load and which ones failed to load.Contextobjects (& subclasses like Fabric2'sConnection) need a clean API for this configuration stuff - eitherContextdirectly grows all the config related methods (perhaps becoming aetcaetera.Configsubclass itself?) or it accepts some config object (again perhapsetc.Config) as an instance member.Connectiontests.Original ticket description from sophacles
It would be nice to be able to pass context variables on the command line to invoke scripts. Something like:
And perhaps even allow targeting variables to specific namespaces, ala:
for those cases where
target2should use the default for var1, but ns.target1 needs the overridden value.There are of course concerns about how command line set options override things in a call to
Collection.configure... take for instance this script:Which is the right output:
option 1:
(note - because generally it's considered cli options override anything in-program)
option 2:
(note because of the way overrides work in invoke already)
I think everyone would agree that:
is correct.