-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Audit and normalize CLI options for providing configuration files #12242
Comments
Also |
Oh I missed that, just looking at the options - it takes them as both ARGS and OPTIONS
ARGS:
<PATHS>...
Any number of Vector config files to test. If none are specified the default config path
`/etc/vector/vector.toml` will be targeted
OPTIONS:
--config-toml <config-toml>
Vector config files in TOML format to test
--config-json <config-json>
Vector config files in JSON format to test
--config-yaml <config-yaml>
Vector config files in YAML format to test
-C, --config-dir <config-dir>
Read configuration from files in one or more directories. File format is detected from
the file name.
Files not ending in .toml, .json, .yaml, or .yml will be ignored.
[env: VECTOR_CONFIG_DIR=] |
Just noting that most subcommands that have the same |
* chore: Mark `vector config` as experimental This wasn't intended to be publicly released but I don't see a great way to hide it from `-h` output without some significant refactoring. Instead, just mark as experimental. We'll want a bit more QA around this subcommand before marking it stable. For example, it lacks support for the normal `--config` flags or an output format. Signed-off-by: Jesse Szwedko <jesse@szwedko.me> * fix(config): Add support for flags to `vector config` To match other subcommands that take configuration. Ref: #12324 Ref: #12242 Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
* chore: Mark `vector config` as experimental This wasn't intended to be publicly released but I don't see a great way to hide it from `-h` output without some significant refactoring. Instead, just mark as experimental. We'll want a bit more QA around this subcommand before marking it stable. For example, it lacks support for the normal `--config` flags or an output format. Signed-off-by: Jesse Szwedko <jesse@szwedko.me> * fix(config): Add support for flags to `vector config` To match other subcommands that take configuration. Ref: #12324 Ref: #12242 Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
See #14688 as well. |
The variety of Vector's commands and sub-commands don't share a common experience for providing configuration files to the invoked command. Non exhaustive examples:
vector
:vector validate
vector config
# No options, does accept ENV VAR based options?
vector graph
Proposal:
Move config options into a separate module such that all commands and sub-commands can share a unified set of options when configurations are needed.
The text was updated successfully, but these errors were encountered: