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] Provide better error or have main.go template be conditional on otelcol_version #9019

Open
mx-psi opened this issue Nov 30, 2023 · 0 comments
Labels
area:builder bug Something isn't working

Comments

@mx-psi
Copy link
Member

mx-psi commented Nov 30, 2023

Describe the bug

If building a Collector with otelcol_version set to v0.88.0 or below with a builder with v0.89.0 or above it will fail to build.

Steps to reproduce

See https://github.com/kenfinnigan/otel-collector-builder-reproducer

What did you expect to see?

The Collector can be built successfully or, alternatively, a clear error message tells me what to do.

What did you see instead?

./main.go:20:70: cannot use components (value of type func() (otelcol.Factories, error)) as otelcol.Factories value in struct literal
make: *** [Makefile:52: otelcontribcolbuilder] Error 1

Additional context

This happens because #8478 broke builds for otelcol_version lower than v0.89.0. On #8713 there is an example of doing this kind of change while avoiding breakage for older Collector versions. I guess the question remains on how much compatibility we want to have with older versions, but since this is easy to handle, I think we should keep compatibility for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:builder bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant