fix(go.mod): clean up to remove dependency on deleted or unmaintained repositories: mitchellh/osext & chenzhuoyu/iasm#3099
Conversation
… repositories: mitchellh/osext & chenzhuoyu/iasm
Datadog ReportBranch report: ✅ 0 Failed, 5185 Passed, 71 Skipped, 2m 55.12s Total Time |
BenchmarksBenchmark execution time: 2025-01-17 13:54:56 Comparing candidate commit 4c88276 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 0 unstable metrics. |
0515a9a to
4c88276
Compare
nsrip-dd
left a comment
There was a problem hiding this comment.
FWIW I can get the same result with go mod commands, without using sed or otherwise manually editing the go.mod file:
go get github.com/bytedance/[email protected]
go get github.com/confluentinc/confluent-kafka-go/[email protected]
go mod tidy
In my case, |
What does this PR do?
Updates
bytedance/sonicandconfluentinc/confluent-kafka-go/v2to avoid indirect references to two another libraries (mitchellh/osext,chenzhuoyu/iasm) that are no longer available or in bad shape.Motivation
Found dd-trace-go compilation issues when pulling dependencies with
GOPROXY=direct.They seem to be supply chain issues, as the packages’ repositories have disappeared or been abandoned.
github.com/chenzhuoyu/iasm
After cloning dd-trace-go on a clean EC2 instance (AWS Linux 2023, Go installed using yum), this happens when running
go mod tidy:The package github.com/chenzhuoyu/iasm is superseded by github.com/cloudwego/iasm. On top of that, the original repository doesn’t have that v0.9.0 tag.
To fix the error, we need to edit the go.mod to remove any reference to chenzhuoyu/* packages in go.mod, and to upgrade bytedance/sonic to the same version in Gin’s latest tagged release, as it’s an indirect dependency pulled in by gin-gonic/gin:
github.com/mitchellh/osext
Running go mod tidy doesn’t end successfully after the previous edit, as there is another package broken: github.com/mitchellh/osext.
In this case, mitchellh/osext has disappeared. It’s unclear if it’s been deleted or set as private.
The dependency comes from github.com/testcontainers/testcontainers-go, imported by github.com/confluentinc/confluent-kafka-go/v2. After multiple tests, we found that it’s required to upgrade the latter's version to a version that also upgrades testcontainers/testcontainers-go:
Reviewer's Checklist
v2-devbranch and reviewed by @DataDog/apm-go.Unsure? Have a question? Request a review!