instana / go-sensor

:rocket: Go Distributed Tracing & Metrics Sensor for Instana
https://www.instana.com/
MIT License
119 stars 39 forks source link

[Bug]: go mod tidy fails when using the latest google.golang.org/grpc #469

Closed juliangp closed 11 months ago

juliangp commented 11 months ago

Problem Description

The package google.golang.org/grpc/test/grpc_testing was moved to google.golang.org/grpc/interop/grpc_testing in google.golang.org/grpc v1.55.0 - this is stopping us from using the latest google.golang.org/grpc.

When we run go mod tidy we get the following error:

go mod tidy
go: finding module for package google.golang.org/grpc/test/grpc_testing
go: github.ibm.com/WML/watsonx-inference-proxy/internal/common/grpc imports
    github.com/instana/go-sensor/instrumentation/instagrpc tested by
    github.com/instana/go-sensor/instrumentation/instagrpc.test imports
    google.golang.org/grpc/test/grpc_testing: module google.golang.org/grpc@latest found (v1.59.0), but does not contain package google.golang.org/grpc/test/grpc_testing

Minimal, Complete, Verifiable, Example

Normally any project that has a go.mod that contains this will fail:

require (
    github.com/instana/go-sensor v1.58.0
    github.com/instana/go-sensor/instrumentation/instagrpc v1.10.0
    google.golang.org/grpc v1.59.0

Go Version

go1.21.3

go.mod

go 1.21

require (
    dario.cat/mergo v1.0.0
    github.com/IBM-Cloud/bluemix-go v0.0.0-20230616121711-b838ccdcd2fb
    github.com/IBM/sarama v1.41.3
    github.com/Jeffail/gabs/v2 v2.7.0
    github.com/alevinval/sse v1.0.1
    github.com/allegro/bigcache/v3 v3.1.0
    github.com/buaazp/fasthttprouter v0.1.1
    github.com/cucumber/godog v0.13.0
    github.com/go-logr/zapr v1.2.4
    github.com/go-redis/redis_rate/v10 v10.0.1
    github.com/google/uuid v1.3.1
    github.com/gorilla/mux v1.8.0
    github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf
    github.com/instana/go-sensor v1.58.0
    github.com/instana/go-sensor/instrumentation/instagrpc v1.10.0
    github.com/nicksnyder/go-i18n/v2 v2.2.1
    github.com/onsi/ginkgo/v2 v2.13.0
    github.com/onsi/gomega v1.28.0
    github.com/opentracing/opentracing-go v1.2.0
    github.com/prometheus/client_golang v1.17.0
    github.com/rabbitmq/amqp091-go v1.9.0
    github.com/redis/go-redis/v9 v9.2.1
    github.com/segmentio/analytics-go/v3 v3.2.1
    github.com/spf13/pflag v1.0.5
    github.com/spf13/viper v1.17.0
    github.com/valyala/fasthttp v1.50.0
    github.com/xeipuuv/gojsonschema v1.2.0
    github.ibm.com/WML/utils-lib-go v1.0.467
    go.uber.org/zap v1.26.0
    golang.org/x/exp v0.0.0-20231006140011-7918f672742d
    golang.org/x/text v0.13.0
    golang.org/x/time v0.3.0
    google.golang.org/grpc v1.59.0
    google.golang.org/protobuf v1.31.0
    gopkg.in/yaml.v2 v2.4.0
    k8s.io/client-go v0.28.2
)

require github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect

require (
    github.com/andybalholm/brotli v1.0.6 // indirect
    github.com/beorn7/perks v1.0.1 // indirect
    github.com/cespare/xxhash/v2 v2.2.0 // indirect
    github.com/cristalhq/jwt/v5 v5.1.0 // indirect
    github.com/cucumber/gherkin-go/v19 v19.0.3 // indirect
    github.com/cucumber/messages-go/v16 v16.0.1 // indirect
    github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
    github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
    github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
    github.com/eapache/go-resiliency v1.4.0 // indirect
    github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
    github.com/eapache/queue v1.1.0 // indirect
    github.com/fsnotify/fsnotify v1.6.0 // indirect
    github.com/gabriel-vasile/mimetype v1.4.3 // indirect
    github.com/go-logr/logr v1.2.4 // indirect
    github.com/go-playground/locales v0.14.1 // indirect
    github.com/go-playground/universal-translator v0.18.1 // indirect
    github.com/go-playground/validator/v10 v10.15.5
    github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
    github.com/goccy/go-json v0.10.2 // indirect
    github.com/gofrs/uuid v4.4.0+incompatible // indirect
    github.com/golang/protobuf v1.5.3 // indirect
    github.com/golang/snappy v0.0.4 // indirect
    github.com/google/go-cmp v0.6.0 // indirect
    github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 // indirect
    github.com/hashicorp/errwrap v1.1.0 // indirect
    github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
    github.com/hashicorp/go-memdb v1.3.4 // indirect
    github.com/hashicorp/go-multierror v1.1.1 // indirect
    github.com/hashicorp/go-uuid v1.0.3 // indirect
    github.com/hashicorp/golang-lru v1.0.2
    github.com/hashicorp/hcl v1.0.0 // indirect
    github.com/jcmturner/aescts/v2 v2.0.0 // indirect
    github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
    github.com/jcmturner/gofork v1.7.6 // indirect
    github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
    github.com/jcmturner/rpc/v2 v2.0.3 // indirect
    github.com/klauspost/compress v1.17.1 // indirect
    github.com/leodido/go-urn v1.2.4 // indirect
    github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
    github.com/lestrrat-go/blackmagic v1.0.2 // indirect
    github.com/lestrrat-go/httpcc v1.0.1 // indirect
    github.com/lestrrat-go/iter v1.0.2 // indirect
    github.com/lestrrat-go/jwx v1.2.26 // indirect
    github.com/lestrrat-go/option v1.0.1 // indirect
    github.com/linkedin/goavro/v2 v2.12.0 // indirect
    github.com/looplab/fsm v1.0.1 // indirect
    github.com/magiconair/properties v1.8.7 // indirect
    github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
    github.com/mitchellh/mapstructure v1.5.0 // indirect
    github.com/pelletier/go-toml/v2 v2.1.0 // indirect
    github.com/pierrec/lz4/v4 v4.1.18 // indirect
    github.com/pkg/errors v0.9.1 // indirect
    github.com/prometheus/client_model v0.5.0 // indirect
    github.com/prometheus/common v0.45.0 // indirect
    github.com/prometheus/procfs v0.12.0 // indirect
    github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
    github.com/sagikazarmark/locafero v0.3.0 // indirect
    github.com/sagikazarmark/slog-shim v0.1.0 // indirect
    github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
    github.com/segmentio/backo-go v1.0.1 // indirect
    github.com/sourcegraph/conc v0.3.0 // indirect
    github.com/spf13/afero v1.10.0 // indirect
    github.com/spf13/cast v1.5.1 // indirect
    github.com/subosito/gotenv v1.6.0 // indirect
    github.com/valyala/bytebufferpool v1.0.0 // indirect
    github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
    github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
    go.uber.org/multierr v1.11.0 // indirect
    golang.org/x/crypto v0.14.0 // indirect
    golang.org/x/net v0.17.0 // indirect
    golang.org/x/sys v0.13.0 // indirect
    golang.org/x/tools v0.14.0 // indirect
    google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect
    gopkg.in/ini.v1 v1.67.0 // indirect
    gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
    gopkg.in/yaml.v3 v3.0.1 // indirect
    k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
)

exclude (
    // exclude these until fixed in instana
    google.golang.org/grpc v1.55.0
    google.golang.org/grpc v1.55.1
    google.golang.org/grpc v1.56.0
    google.golang.org/grpc v1.56.1
    google.golang.org/grpc v1.56.2
    google.golang.org/grpc v1.56.3
    google.golang.org/grpc v1.57.0
    google.golang.org/grpc v1.57.1
    google.golang.org/grpc v1.58.0
    google.golang.org/grpc v1.58.1
    google.golang.org/grpc v1.58.2
    google.golang.org/grpc v1.58.3
)

go env

GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/julianpayne/Library/Caches/go-build'
GOENV='/Users/julianpayne/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/julianpayne/go/pkg/mod'
GONOPROXY=''
GONOSUMDB='github.ibm.com/*'
GOOS='darwin'
GOPATH='/Users/julianpayne/go'
GOPRIVATE=''
GOPROXY='https://julianpayne@fr.ibm.com:cmVmdGtuOjAxOjE2OTc5ODA3Mzc6ZWhMaENFWnp0T1hxdFRQRzRqeFAwQ3phbzFY@na.artifactory.swg-devops.com/artifactory/api/go/hyc-wml-devops-team-repository-go-virtual'
GOROOT='/opt/homebrew/Cellar/go/1.21.3/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/Cellar/go/1.21.3/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.3'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/julianpayne/vscode/watsonx-inference-proxy/go.mod'
GOWORK='/Users/julianpayne/vscode/go.work'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/jc/69m4y73s6gsd5g6mk7ydnpv80000gn/T/go-build2835764399=/tmp/go-build -gno-record-gcc-switches -fno-common'
willianpc commented 11 months ago

Hi @juliangp thanks for reporting this issue. We will take a look and keep you posted.

Cheers, _ Willian

cc @instana/eng-go

sanojsubran commented 11 months ago

Hi @juliangp, We have released a new package v1.11.0 for instagrpc with support for grpc v1.9.0. Kindly check it.

Thanks, Sanoj

juliangp commented 11 months ago

@sanojsubran @willianpc the release v1.11.0 fixes our issue - many thanks!