Skip to content
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

dependence package missing and failure the build #4586

Closed
SamYuan1990 opened this issue Oct 5, 2023 · 5 comments
Closed

dependence package missing and failure the build #4586

SamYuan1990 opened this issue Oct 5, 2023 · 5 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@SamYuan1990
Copy link

Description

When I use go mod tidy to refresh my project today, I found that some package dependency are missing, and the command failure.

go mod tidy
go: finding module for package go.opentelemetry.io/otel/exporters/otlp/internal/envconfig
go: finding module for package go.opentelemetry.io/otel/exporters/otlp/internal
go: github.com/hyperledger-twgc/tape/pkg/infra/trafficGenerator imports
        github.com/open-policy-agent/opa/rego imports
        github.com/open-policy-agent/opa/plugins tested by
        github.com/open-policy-agent/opa/plugins.test imports
        github.com/open-policy-agent/opa/internal/distributedtracing imports
        go.opentelemetry.io/otel/exporters/otlp/otlptrace imports
        go.opentelemetry.io/otel/exporters/otlp/internal: module go.opentelemetry.io/otel/exporters/otlp@latest found (v0.20.1), but does not contain package go.opentelemetry.io/otel/exporters/otlp/internal
go: github.com/hyperledger-twgc/tape/pkg/infra/trafficGenerator imports
        github.com/open-policy-agent/opa/rego imports
        github.com/open-policy-agent/opa/plugins tested by
        github.com/open-policy-agent/opa/plugins.test imports
        github.com/open-policy-agent/opa/internal/distributedtracing imports
        go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc imports
        go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig imports
        go.opentelemetry.io/otel/exporters/otlp/internal/envconfig: module go.opentelemetry.io/otel/exporters/otlp@latest found (v0.20.1), but does not contain package go.opentelemetry.io/otel/exporters/otlp/internal/envconfig

Environment

  • OS: [e.g. iOS]
  • Architecture: [e.g. x86, i386]
  • Go Version: [e.g. 1.15]
  • opentelemetry-go version: [e.g. v0.14.0, 3c7face]

Steps To Reproduce

  1. Use the configuration '...'
  2. Run '...'
  3. See error

Expected behavior

Is there any guidance https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp to use replace feature of go mod to fix this?

@SamYuan1990 SamYuan1990 added the bug Something isn't working label Oct 5, 2023
@MrAlias
Copy link
Contributor

MrAlias commented Oct 9, 2023

Thank you for your interest in the project. Can you provide a minimal example that reproduces your failure? Please include the go.mod file for the example.

This is likely caused by an incomplete upgrade of all go.opentelemetry.io packages, but it is not possible to say with the current information provided.

@MrAlias MrAlias added invalid This doesn't seem right response needed Waiting on user input before progress can be made labels Oct 9, 2023
@cksidharthan
Copy link

cksidharthan commented Oct 10, 2023

I'm facing the same issue too.

Go version - 1.21.1

I've created a git branch - otel/bug in https://github.com/cksidharthan/opa-blog/tree/otel/bug repo.

If you run go mod tidy you can see this issue :)

go: finding module for package go.opentelemetry.io/otel/exporters/otlp/internal/envconfig
go: finding module for package go.opentelemetry.io/otel/exporters/otlp/internal
go: test imports
        github.com/open-policy-agent/opa/rego imports
        github.com/open-policy-agent/opa/plugins tested by
        github.com/open-policy-agent/opa/plugins.test imports
        github.com/open-policy-agent/opa/internal/distributedtracing imports
        go.opentelemetry.io/otel/exporters/otlp/otlptrace imports
        go.opentelemetry.io/otel/exporters/otlp/internal: module go.opentelemetry.io/otel/exporters/otlp@latest found (v0.20.1), but does not contain package go.opentelemetry.io/otel/exporters/otlp/internal
go: test imports
        github.com/open-policy-agent/opa/rego imports
        github.com/open-policy-agent/opa/plugins tested by
        github.com/open-policy-agent/opa/plugins.test imports
        github.com/open-policy-agent/opa/internal/distributedtracing imports
        go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc imports
        go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig imports
        go.opentelemetry.io/otel/exporters/otlp/internal/envconfig: module go.opentelemetry.io/otel/exporters/otlp@latest found (v0.20.1), but does not contain package go.opentelemetry.io/otel/exporters/otlp/internal/envconfig

@pellared
Copy link
Member

pellared commented Oct 10, 2023

@cksidharthan The github.com/open-policy-agent/opa requires some older version of OTel Go modules and unfortunately the newer version had breaking changes in cross-module internal code (sic!, related issue #3846)

To fix the problem you need to manually bump some dependencies.

Run the following on your repository (it should fix the issue):

go get go.opentelemetry.io/otel/exporters/otlp/otlptrace@v1.19.0
go get go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc@v1.19.0
go mod tidy

Unfortunately, the easiest way to avoid such problems would be to bump OTel Go modules in https://github.com/open-policy-agent/opa.

@pellared
Copy link
Member

I created open-policy-agent/opa#6292

@cksidharthan
Copy link

Hi @pellared, we can close this issue. Have fixed this in open-policy-agent/opa#6293

@pellared pellared closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
@pellared pellared removed the response needed Waiting on user input before progress can be made label Oct 11, 2023
oshoval added a commit to oshoval/cluster-network-addons-operator that referenced this issue Nov 19, 2023
…http/otelhttp

Update `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`
according GHSA-rcjv-mgp8-qvmr
and do manual required changes based on
open-telemetry/opentelemetry-go#4586 (comment)

Signed-off-by: Or Shoval <oshoval@redhat.com>
kubevirt-bot pushed a commit to kubevirt/cluster-network-addons-operator that referenced this issue Nov 20, 2023
…http/otelhttp (#1707)

Update `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`
according GHSA-rcjv-mgp8-qvmr
and do manual required changes based on
open-telemetry/opentelemetry-go#4586 (comment)

Signed-off-by: Or Shoval <oshoval@redhat.com>
oshoval added a commit to oshoval/cluster-network-addons-operator that referenced this issue Nov 22, 2023
Fixes CVE-2023-45142

Update `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`
according GHSA-rcjv-mgp8-qvmr
and do manual required changes based on
open-telemetry/opentelemetry-go#4586 (comment)

Signed-off-by: Or Shoval <oshoval@redhat.com>
oshoval added a commit to oshoval/cluster-network-addons-operator that referenced this issue Nov 22, 2023
Fixes CVE-2023-45142

Update `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`
according GHSA-rcjv-mgp8-qvmr
and do manual required changes based on
open-telemetry/opentelemetry-go#4586 (comment)

Signed-off-by: Or Shoval <oshoval@redhat.com>
oshoval added a commit to oshoval/cluster-network-addons-operator that referenced this issue Nov 22, 2023
Update go version

Fixes CVE-2023-45142

Update `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`
according GHSA-rcjv-mgp8-qvmr
and do manual required changes based on
open-telemetry/opentelemetry-go#4586 (comment)

Signed-off-by: Or Shoval <oshoval@redhat.com>
oshoval added a commit to oshoval/cluster-network-addons-operator that referenced this issue Nov 29, 2023
Update go version

Fixes CVE-2023-45142

Update `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`
according GHSA-rcjv-mgp8-qvmr
and do manual required changes based on
open-telemetry/opentelemetry-go#4586 (comment)

Signed-off-by: Or Shoval <oshoval@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants