open-telemetry / opentelemetry-collector

OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
4.39k stars 1.45k forks source link

Remove builder support to build old version #11405

Open bogdandrutu opened 2 weeks ago

bogdandrutu commented 2 weeks ago

One of the reason the mess with default providers (see https://github.com/open-telemetry/opentelemetry-collector/issues/11403 or https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.109.0 or the need to disable strict check, see https://github.com/open-telemetry/opentelemetry-collector/pull/11168) is the support of building older version of the collector with newer builder, which also is very fragile because it makes the assumption that the generated files (templates) will know how to talk to multiple versions. For this, because I believe this is not a very useful feature, but brings us a lot of troubles, already caused issues because we could not fix things simpler (for example to hardcode the versions for default confmap providers, etc.).

For this, we need to remove the config otelcol_version and always use the hardcoded "default_version".

We already print an warning https://github.com/open-telemetry/opentelemetry-collector/blob/main/cmd/builder/internal/builder/main.go#L77

bogdandrutu commented 2 weeks ago

@mx-psi here is a followup on how we can remove a lot of complications, and I believe is reasonable to have this and we can have much better checks, etc.

mx-psi commented 2 weeks ago

We have #9366, agreed that this is something we want to do

bogdandrutu commented 2 weeks ago

Looks like I am consistent :))))