Skip to content
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] Fix deprecation warning for multiline config source calls #5829

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

dmitryax
Copy link
Contributor

@dmitryax dmitryax commented Jan 21, 2025

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
Interval: 3s
 with ${include: /Users/danoshin/Projects/otel-configs/memory-limiter.yaml
Interval: 3s
} 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
Interval: 3s

One-line deprecation warnings stay as is.

@dmitryax dmitryax requested review from a team as code owners January 21, 2025 19:56
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.
@dmitryax dmitryax requested a review from a team as a code owner January 21, 2025 20:24
@dmitryax dmitryax merged commit 8c304a8 into main Jan 21, 2025
263 of 265 checks passed
@dmitryax dmitryax deleted the fail-bare-env-vars branch January 21, 2025 20:48
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants