open-telemetry / opentelemetry-collector

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

useless warning about ocb version missmatch #10514

Open cforce opened 2 weeks ago

cforce commented 2 weeks ago

Below warning makes no sense to me

2024-07-02T16:42:35.279Z INFO internal/command.go:125 OpenTelemetry Collector Builder {"version": "0.102.0", "date": "2024-06-04T08:26:04Z"} 2024-07-02T16:42:35.281Z INFO internal/command.go:161 Using config file {"path": "cta/builder-dev.yaml"} 2024-07-02T16:42:35.281Z INFO builder/config.go:132 Using go {"go-executable": "/usr/local/go/bin/go"} 2024-07-02T16:42:35.281Z INFO builder/main.go:77 You're building a distribution with non-aligned version of the builder. Compilation may fail due to API changes. Please upgrade your builder or API {"builder-version": "0.102.0"}

codeboten commented 2 weeks ago

This usually means that the version being built by the configuration doesn't match the version of ocb that is building it, this could cause the compilation of the binary to fail.

Maybe the message should include this information to clarify what the end user action should be?

cforce commented 2 weeks ago

Got it . Would help to tell that collector version in XX and ocb YY -> not equal, so potential issues

codeboten commented 2 weeks ago

Would help to tell that collector version in XX and ocb YY -> not equal, so potential issues

For sure, would you like to open a PR to apply the change?

cforce commented 1 week ago

Well, if you point me out where this logic currently lives .and i am sure i would need to go through some approval required general for each committer on this project first, don't i.

codeboten commented 1 week ago

The error message lives here:

https://github.com/open-telemetry/opentelemetry-collector/blob/18e78af093054cab5875418a7f02e9fbaa887a1a/cmd/builder/internal/builder/main.go#L77

And right, the PR would need to be reviewed and approved and you'd need to sign the CLA if you haven't already done so https://opentelemetry.io/docs/contributing/requirements/#sign-the-cla.