Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deprecation warning for multiline config source calls (#5829)
There is a deprecation for bare config source calls. `${source:value[?params]}` should be used instead of `$source:value[?params]`. It's also applied to multiline config source calls. One-line format like `${source:value?param1=val1,param2=val2}` should be used instead of multiline calls with a bare reference to a config source like the following DEPRECATED call: ``` config_field: | $source: value param1: val1 param2: val2 ``` However, the deprecation warning is broken. This change fixes that. So instead of ``` [WARNING] Config source expansion formatted as $uri:selector has been deprecated, use ${uri:selector[?params]} instead. Please replace $include: /Users/danoshin/Projects/otel-configs/memory-limiter.yaml watch_files: true with ${include: /Users/danoshin/Projects/otel-configs/memory-limiter.yaml watch_files: true } in your configuration ``` users will see ``` [WARNING] Calling config sources in multiline format is deprecated. Please convert the following call to the one-line format ${uri:selector?param1=value1,param2=value2}: include: /Users/danoshin/Projects/otel-configs/memory-limiter.yaml watch_files: true ``` One-line deprecation warnings stay as is.
- Loading branch information