[cmd/builder] Provide better error or have main.go
template be conditional on otelcol_version
#9019
Labels
main.go
template be conditional on otelcol_version
#9019
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?
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.The text was updated successfully, but these errors were encountered: