Skip to content

Treat list options in env variables consistently #2236

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

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

dominiklohmann
Copy link
Member

@dominiklohmann dominiklohmann commented Apr 26, 2022

Before this change, there were four different ways to handle environment variables for list options: Either through a caf::config_option_set, manually split at a colon or a comma, or through the data parser.

Now, all list options are handled consistently, and can be specified either as single values or as comma-separated lists that support proper escaping.

For the VAST_SCHEMA_DIRS and VAST_PLUGIN_DIRS option this is a subtle breaking change, as they no longer can be specified with a colon-seperator, and commas in the specified directories must now be escaped.

📝 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

🎯 Review Instructions

File-by-file. The logic changes in the C++ code should be rather simple to follow. The CMake changes escape , to \\, in paths.

Note that this is a bug-fix, as it aligns the actual behavior with the documented behavior.

@dominiklohmann dominiklohmann added the bug Incorrect behavior label Apr 26, 2022
@dominiklohmann dominiklohmann requested review from mavam and a team April 26, 2022 07:42
Before this change, there were four different ways to handle environment
variables for list options: Either through a `caf::config_option_set`, manually
split at a colon or a comma, or through the `data` parser.

Now, all list options are handled consistently, and can be specified either as
single values or as comma-separated lists that support proper escaping.

For the `VAST_SCHEMA_DIRS` and `VAST_PLUGIN_DIRS` option this is a subtle
breaking change, as they no longer can be specified with a colon-seperator, and
commas in the specified directories must now be escaped.
@dominiklohmann dominiklohmann force-pushed the story/sc-33094/env-config-lists branch from 1073acb to 3f7e82b Compare April 26, 2022 07:44
@dominiklohmann dominiklohmann merged commit b26bfbf into master Apr 26, 2022
@dominiklohmann dominiklohmann deleted the story/sc-33094/env-config-lists branch April 26, 2022 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants