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

[otelcol] Add hint about confmap.strictlyTypedInput feature gate #10553

Merged
merged 4 commits into from
Jul 9, 2024

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Jul 8, 2024

Description

Adds coda to errors related to confmap.strictlyTypedInput that direct users to #10552 and explain the feature gate.

Link to tracking issue

Updates #9532

Testing

Tests that the coda is present when there are weakly typed errors and not present with non weakly-typed errors.

Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.34%. Comparing base (de8bd27) to head (ce49d23).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10553   +/-   ##
=======================================
  Coverage   92.33%   92.34%           
=======================================
  Files         393      393           
  Lines       18647    18660   +13     
=======================================
+ Hits        17218    17231   +13     
  Misses       1069     1069           
  Partials      360      360           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mx-psi mx-psi marked this pull request as ready for review July 8, 2024 14:15
@mx-psi mx-psi requested review from a team, atoulme and TylerHelmuth July 8, 2024 14:15
@mx-psi
Copy link
Member Author

mx-psi commented Jul 8, 2024

Using a config similar to that of #9532 (comment) this is the error message:

Error: failed to get config: cannot unmarshal the configuration: 3 error(s) decoding:

* 'service.pipelines[metrics].processors': source data must be an array or slice, got map
* 'service.pipelines[metrics].receivers': source data must be an array or slice, got string
* error decoding 'exporters': error reading configuration for "otlp": 5 error(s) decoding:

* 'headers' expected a map, got 'slice'
* 'keepalive.permit_without_stream' expected type 'bool', got unconvertible type 'int', value: '23'
* 'read_buffer_size' expected type 'int', got unconvertible type 'bool', value: 'true'
* 'tls.insecure' expected type 'bool', got unconvertible type 'string', value: 't'
* 'write_buffer_size' expected type 'int', got unconvertible type 'string', value: '1234'

Hint: Temporarily restore the previous behavior by disabling 
      the `confmap.strictlyTypedInput` feature gate. More details at:
      https://github.com/open-telemetry/opentelemetry-collector/issues/10552

Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice and detailed, I like it

@mx-psi mx-psi merged commit e7ce1d5 into open-telemetry:main Jul 9, 2024
50 checks passed
@github-actions github-actions bot added this to the next release milestone Jul 9, 2024
mx-psi added a commit that referenced this pull request Jul 12, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Makes type resolution strict and conforming to the behavior described in
[the env vars
RFC](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/rfcs/env-vars.md)

Depends on:

- #10553
- #10555
- #10559
- open-telemetry/opentelemetry-collector-contrib/pull/33950

<!-- Issue number if applicable -->
#### Link to tracking issue
Fixes #9532, Fixes #8565

---------

Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants