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] Remove all default providers/converters #10436

Merged
merged 16 commits into from
Jun 28, 2024

Conversation

TylerHelmuth
Copy link
Member

@TylerHelmuth TylerHelmuth commented Jun 18, 2024

Description

Removed deprecated NewCommand. Deprecates NewCommandMustSetProvider. Adds NewCommand that requires at least one provider be set.

Removes usage of imported providers/converters from otelcol (but they still live in otelcoltest until #10417 is merged.

Link to tracking issue

closes #10290.

Testing

Unit tests

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

Can we file an issue on the Jaeger project and ping Yuri there so that they are aware of this change?

@TylerHelmuth
Copy link
Member Author

TylerHelmuth commented Jun 19, 2024

I'm planning to submit another PR to jaeger to handle the deprecation process, was waiting for the 0.103.0 release to finish in Contrib. I've already update Jaeger to pass in providers.

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

Looks like there are some tests to fix, but otherwise this LGTM. I would like to merge this after Jaeger is fixed

@TylerHelmuth
Copy link
Member Author

Jaeger is updated: jaegertracing/jaeger#5657

@@ -258,6 +258,8 @@ func TestGenerateAndCompile(t *testing.T) {
testCase: "Default Configuration Compilation",
cfgBuilder: func(t *testing.T) Config {
cfg := newTestConfig()
err := cfg.SetBackwardsCompatibility()
Copy link
Member Author

Choose a reason for hiding this comment

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

These tests all pass in a list of providers, and therefore depend on those providers in the go mod list. The builder templates only add them when .Distribution.SupportsConfmapFactories is true. That value was not being set so all these tests should have been failing. They were saved instead by the fact that otelcol depended on the providers. The changes in this PR remove those dependencies when otelcoltest is not being used, so these tests started failing. The fix was to make sure .Distribution.SupportsConfmapFactories is true, which is included in cfg.SetBackwardsCompatibility().

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch, thanks for the explanation.

Copy link

codecov bot commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.40%. Comparing base (227fb82) to head (d32d22d).

Files Patch % Lines
otelcol/command.go 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10436      +/-   ##
==========================================
- Coverage   92.40%   92.40%   -0.01%     
==========================================
  Files         393      393              
  Lines       18584    18567      -17     
==========================================
- Hits        17173    17156      -17     
  Misses       1056     1056              
  Partials      355      355              

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

otelcol/command.go Show resolved Hide resolved
otelcol/command.go Outdated Show resolved Hide resolved
@mx-psi mx-psi requested a review from evan-bradley June 25, 2024 13:08
@mx-psi
Copy link
Member

mx-psi commented Jun 25, 2024

@TylerHelmuth can you resolve the conflict?

@TylerHelmuth
Copy link
Member Author

@mx-psi conflict handled.

@mx-psi
Copy link
Member

mx-psi commented Jun 26, 2024

@evan-bradley will merge this by Friday EU morning unless you comment by then!

@mx-psi mx-psi merged commit 5309d60 into open-telemetry:main Jun 28, 2024
49 of 50 checks passed
@github-actions github-actions bot added this to the next release milestone Jun 28, 2024
@evan-bradley
Copy link
Contributor

Sorry, I was out last week, thanks for not holding this up on me. This looks good to me, the negative diff in the go.mod file is a win in my eyes.

@mx-psi
Copy link
Member

mx-psi commented Jul 1, 2024

Agreed, I am pretty happy about the go.mod update :)

@TylerHelmuth TylerHelmuth deleted the otelcol-update-commane branch July 1, 2024 18:00
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.

[otelcol] Determine if NewCommand should supply any default providers/converters
3 participants