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

Bump OpenTelemetry dependencies and its direct and indirect dependencies #719

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

adamyeats
Copy link
Contributor

@adamyeats adamyeats commented Aug 1, 2023

This PR supersedes #696, #694, #693.

In clickhouse-datasource, we to started see pipeline failures because Dependabot is trying to roll back the clickhouse driver to 2.3.0. After some assistance from a GitHub dev (thank you!), we found that go get was resolving dependencies incorrectly. Running go get github.com/ClickHouse/clickhouse-go/v2, then go get github.com/grafana/grafana-plugin-sdk-go, then go mod tidy, produced the following output:

go: finding module for package go.opentelemetry.io/otel/metric/instrument
go: finding module for package go.opentelemetry.io/otel/metric/global
github.com/grafana/clickhouse-datasource/pkg imports
	github.com/grafana/grafana-plugin-sdk-go/backend imports
	go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc imports
	go.opentelemetry.io/otel/metric/global: module go.opentelemetry.io/otel/metric@latest found (v1.16.0), but does not contain package go.opentelemetry.io/otel/metric/global
github.com/grafana/clickhouse-datasource/pkg imports
	github.com/grafana/grafana-plugin-sdk-go/backend imports
	go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc imports
	go.opentelemetry.io/otel/metric/instrument: module go.opentelemetry.io/otel/metric@latest found (v1.16.0), but does not contain package go.opentelemetry.io/otel/metric/instrument

When grafana-plugin-sdk-go is resolved by the package manager, that downgrades clickhouse-go to v2.3.0 as that's the latest version that it can reconcile the version of otel/trace depended on by both clickhouse-go and grafana-plugin-sdk-go.

This PR bumps all the OpenTelemetry packages all at once with the -u flag so that interlinking dependencies between opentelemetry-go and opentelemetry-go-contrib and it's dependencies are resolved. After a release, this should fix the issue we are experiencing.

@adamyeats adamyeats added bug Something isn't working dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Aug 1, 2023
@adamyeats adamyeats requested a review from a team as a code owner August 1, 2023 16:03
@adamyeats adamyeats self-assigned this Aug 1, 2023
@adamyeats adamyeats requested review from wbrowne and oshirohugo and removed request for a team August 1, 2023 16:03
@CLAassistant
Copy link

CLAassistant commented Aug 1, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@wbrowne wbrowne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just leaving a note here that this should be manually tested before merged (due to the changes in grpc and protobuf dependencies). Will get to this ASAP

@@ -20,10 +20,10 @@ require (
github.com/olekukonko/tablewriter v0.0.5
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/common v0.42.0
github.com/stretchr/testify v1.8.2
github.com/stretchr/testify v1.8.3
Copy link
Contributor Author

@adamyeats adamyeats Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only packages under the go.opentelemetry.io namespace were manually upgraded by me, the others are all modified by go get -u.

@xnyo xnyo self-requested a review August 7, 2023 12:55
Copy link

@asimpson asimpson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Copy link
Member

@xnyo xnyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested GRPC/Protobuf changes and they seem good!

LGTM! Thank you, and sorry for the delay 😅

@adamyeats adamyeats merged commit 976bbdf into main Aug 18, 2023
2 checks passed
@adamyeats adamyeats deleted the bump-otel branch August 18, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants