-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Remove custom standard libraries dependencies from the contrib main build #16722
Remove custom standard libraries dependencies from the contrib main build #16722
Comments
Pinging code owners for exporter/loki: @gramidt @gouthamve @jpkrohling @kovrus @mar4uk. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Are those dependencies ending up on the binary? I understand we depend only on the proto files, none of those other dependencies are in the binary. |
I believe so since I have to add the replace statements on these libraries, I do expect golang compiler/linker to be smart enough to ignore the code that we don't need in the final binary (at least I know that is true in other languages). |
These 4 replace directives were introduced in promtailreceiver (#14632) We agreed with reviewers that we will get rid of these replaces in the future (as soon as possible) and Juraci created an issue 16453 To remove these replaces right now I need to remove promtailreceiver. Can we postpone this issue till the end of January? I will try to get rid of the replaces till then. |
I recommend that we remove the promtailreceiver until this issue is resolved. It will still be tagged and made available for users who want to include it in a custom distribution, but it sounds like we're not yet ready to include it. |
The promtail receiver isn't part of the releses repository. |
I just checked the resulting binary for an otelcol-contrib and could find traces only of the last dependency:
|
On top of this, fyi github.com/grafana/loki uses go 1.19 which is another reason we may have to remove this dependency. |
There are other dependencies that use Go 1.19. I believe that shouldn't be a reason to remove loki. It is probably better to bump up the collector Go version instead of restricting dependencies using Go 1.19 |
@bogdandrutu do you think all these 4 replacements are blockers to include promtail receiver to release? Or the go-kit is the most disturbing one? Loki team can remove go-kit replacement by using a fork as the main dependency. That will allow removal replacement from the collector contrib right away |
Hey @mar4uk / @jpkrohling - Any update on this by chance? We noticed that the |
@disfluxly could you please send the config for the builder you use? |
We've tried multiple With
Compiling with Go 1.19 has the same error, just less the
Edit: Added go 1.19 compilation error |
**What this PR does / why we need it**: The PR cloudflare/cloudflare-go#743 to the upstream repo https://github.com/cloudflare/cloudflare-go was closed with the resolution: > We've spoken to the Grafana Loki team and they'll be building out an integration with Logpush so I don't think this is needed from their side anymore. I [spoke](https://raintank-corp.slack.com/archives/C9T1FLN9K/p1666293494583359) to Loki team and found out that moving to Logpush is not on the shortlist plan right now. I suggest moving to [github.com/grafana/cloudflare-go](https://github.com/grafana/cloudflare-go) fork as the main dependency to get rid of replacement directive. https://github.com/grafana/loki/blob/02e0b3ae89fb5b0dc8849448a1cd2911e0efa1a2/go.mod#L320 Another point is replace directives complicate using loki as a dependency in other packages because replace directives should be moved to the upstream package as well. In general, replace was designed as a temporary solution to test code. It shouldn't be used permanently. **Which issue(s) this PR fixes**: Fixes open-telemetry/opentelemetry-collector-contrib#16722, open-telemetry/opentelemetry-collector-contrib#16453 **Special notes for your reviewer**: **Checklist** - [x] Reviewed the [`CONTRIBUTING.md`](../CONTRIBUTING.md) guide (**required**) - [ ] Documentation added - [ ] Tests updated - [ ] `CHANGELOG.md` updated - [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md`
This issue can be closed. All replace directives mentioned in the description were removed |
Component(s)
exporter/loki
Is your feature request related to a problem? Please describe.
Loki exporter brings custom alternatives of standard libraries like go-kit as requirement in the collector build, see:
Describe the solution you'd like
Remove dependency on non standard libraries (e.g. replacement of go-kit with a custom library).
Describe alternatives you've considered
No response
Additional context
If nothing happens in the next few weeks we should remove the loki exporter, since using custom builds of libraries is consider a security threat and should be discouraged.
The text was updated successfully, but these errors were encountered: