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

[cmd/builder] Fix otelcol_version being ignored #8713

Merged
merged 4 commits into from
Oct 20, 2023

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented Oct 20, 2023

Description:

Adds go.opentelemetry.io/collector/otelcol to go.mod template for the builder. This fixes #8692.

Since #8443, the otelcol folder is its own component. Before this change, otelcol_version was enforced by the collector module dependency:

go.opentelemetry.io/collector v{{.Distribution.OtelColVersion}}

After this change, the go mod tidy step here:

cmd := exec.Command(cfg.Distribution.Go, "mod", "tidy", "-compat=1.20")

will add the latest available version for the otelcol module since none of the components actually depend on it. For example, with the v0.86.0 builder config the output is as follows:

❯ go mod tidy -v -compat=1.20
go: finding module for package go.opentelemetry.io/collector/otelcol
go: found go.opentelemetry.io/collector/otelcol in go.opentelemetry.io/collector/otelcol v0.87.0

Explicitly adding otelcol makes it so the otelcol_version is correctly honored.

Link to tracking Issue: Fixes #8692

@mx-psi mx-psi marked this pull request as ready for review October 20, 2023 09:25
@mx-psi mx-psi requested review from a team, Aneurysm9 and codeboten October 20, 2023 09:25
@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Files Coverage Δ
cmd/builder/internal/command.go 61.97% <0.00%> (-1.34%) ⬇️
cmd/builder/internal/builder/config.go 65.95% <45.45%> (-2.72%) ⬇️

📢 Thoughts on this report? Let us know!.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Thanks for fixing @mx-psi

@codeboten codeboten merged commit 7c33b71 into open-telemetry:main Oct 20, 2023
29 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 20, 2023
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.

[cmd/builder] ocb ignores otelcol_version if set to v0.86.0 or higher
2 participants