Skip to content

Commit

Permalink
Drop support for Go 1.19 (open-telemetry#4481)
Browse files Browse the repository at this point in the history
* Drop support for Go 1.19

* Add change to changelog

* Bump all modules to 1.20

* Update exponential_histogram_test.go

---------

Co-authored-by: Robert Pająk <[email protected]>
  • Loading branch information
MrAlias and pellared authored Sep 7, 2023
1 parent 6eedabf commit 9737995
Show file tree
Hide file tree
Showing 35 changed files with 46 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
compatibility-test:
strategy:
matrix:
go-version: ["~1.21.1", "~1.20.8", 1.19]
go-version: ["~1.21.1", "~1.20.8"]
os: [ubuntu-latest, macos-latest, windows-latest]
# GitHub Actions does not support arm* architectures on default
# runners. It is possible to accomplish this with a self-hosted runner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-dependabot-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "~1.21.1"

- uses: actions/checkout@v3

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Removed the deprecated `go.opentelemetry.io/otel/example/jaeger` package. (#4467)
- Removed the deprecated `go.opentelemetry.io/otel/sdk/metric/aggregation` package. (#4468)
- Removed the deprecated internal packages in `go.opentelemetry.io/otel/exporters/otlp` and its sub-packages. (#4469)
- Dropped guaranteed support for versions of Go less than 1.20. (#4481)

## [1.17.0/0.40.0/0.0.5] 2023-08-28

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ go-mod-tidy/%: DIR=$*
go-mod-tidy/%: | crosslink
@echo "$(GO) mod tidy in $(DIR)" \
&& cd $(DIR) \
&& $(GO) mod tidy -compat=1.19
&& $(GO) mod tidy -compat=1.20

.PHONY: lint-modules
lint-modules: go-mod-tidy
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,14 @@ Currently, this project supports the following environments.
|---------|------------|--------------|
| Ubuntu | 1.21 | amd64 |
| Ubuntu | 1.20 | amd64 |
| Ubuntu | 1.19 | amd64 |
| Ubuntu | 1.21 | 386 |
| Ubuntu | 1.20 | 386 |
| Ubuntu | 1.19 | 386 |
| MacOS | 1.21 | amd64 |
| MacOS | 1.20 | amd64 |
| MacOS | 1.19 | amd64 |
| Windows | 1.21 | amd64 |
| Windows | 1.20 | amd64 |
| Windows | 1.19 | amd64 |
| Windows | 1.21 | 386 |
| Windows | 1.20 | 386 |
| Windows | 1.19 | 386 |

While this project should work for other systems, no compatibility guarantees
are made for those systems currently.
Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/bridge/opencensus

go 1.19
go 1.20

require (
github.com/stretchr/testify v1.8.4
Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/test/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/bridge/opencensus/test

go 1.19
go 1.20

require (
go.opencensus.io v0.24.0
Expand Down
2 changes: 1 addition & 1 deletion bridge/opentracing/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/bridge/opentracing

go 1.19
go 1.20

replace go.opentelemetry.io/otel => ../..

Expand Down
2 changes: 1 addition & 1 deletion bridge/opentracing/test/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/bridge/opentracing/test

go 1.19
go 1.20

replace go.opentelemetry.io/otel => ../../..

Expand Down
2 changes: 1 addition & 1 deletion example/fib/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/fib

go 1.19
go 1.20

require (
go.opentelemetry.io/otel v1.17.0
Expand Down
2 changes: 1 addition & 1 deletion example/namedtracer/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/namedtracer

go 1.19
go 1.20

replace (
go.opentelemetry.io/otel => ../..
Expand Down
2 changes: 1 addition & 1 deletion example/opencensus/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/opencensus

go 1.19
go 1.20

replace (
go.opentelemetry.io/otel => ../..
Expand Down
2 changes: 1 addition & 1 deletion example/otel-collector/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/otel-collector

go 1.19
go 1.20

replace (
go.opentelemetry.io/otel => ../..
Expand Down
2 changes: 1 addition & 1 deletion example/passthrough/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/passthrough

go 1.19
go 1.20

require (
go.opentelemetry.io/otel v1.17.0
Expand Down
2 changes: 1 addition & 1 deletion example/prometheus/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/prometheus

go 1.19
go 1.20

require (
github.com/prometheus/client_golang v1.16.0
Expand Down
2 changes: 1 addition & 1 deletion example/view/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/view

go 1.19
go 1.20

require (
github.com/prometheus/client_golang v1.16.0
Expand Down
2 changes: 1 addition & 1 deletion example/zipkin/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/example/zipkin

go 1.19
go 1.20

replace (
go.opentelemetry.io/otel => ../..
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlpmetric/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/otlp/otlpmetric

go 1.19
go 1.20

require github.com/stretchr/testify v1.8.4

Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlpmetric/otlpmetricgrpc/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc

go 1.19
go 1.20

retract v0.32.2 // Contains unresolvable dependencies.

Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlpmetric/otlpmetrichttp/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp

go 1.19
go 1.20

retract v0.32.2 // Contains unresolvable dependencies.

Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/otlp/otlptrace

go 1.19
go 1.20

require (
github.com/google/go-cmp v0.5.9
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/otlptracegrpc/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc

go 1.19
go 1.20

require (
github.com/cenkalti/backoff/v4 v4.2.1
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/otlptracehttp/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp

go 1.19
go 1.20

require (
github.com/cenkalti/backoff/v4 v4.2.1
Expand Down
2 changes: 1 addition & 1 deletion exporters/prometheus/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/prometheus

go 1.19
go 1.20

require (
github.com/prometheus/client_golang v1.16.0
Expand Down
2 changes: 1 addition & 1 deletion exporters/stdout/stdoutmetric/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/stdout/stdoutmetric

go 1.19
go 1.20

require (
github.com/stretchr/testify v1.8.4
Expand Down
2 changes: 1 addition & 1 deletion exporters/stdout/stdouttrace/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/stdout/stdouttrace

go 1.19
go 1.20

replace (
go.opentelemetry.io/otel => ../../..
Expand Down
2 changes: 1 addition & 1 deletion exporters/zipkin/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/exporters/zipkin

go 1.19
go 1.20

require (
github.com/go-logr/logr v1.2.4
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel

go 1.19
go 1.20

require (
github.com/go-logr/logr v1.2.4
Expand Down
2 changes: 1 addition & 1 deletion internal/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/internal/tools

go 1.19
go 1.20

require (
github.com/client9/misspell v0.3.4
Expand Down
2 changes: 1 addition & 1 deletion metric/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/metric

go 1.19
go 1.20

require (
github.com/stretchr/testify v1.8.4
Expand Down
2 changes: 1 addition & 1 deletion schema/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/schema

go 1.19
go 1.20

require (
github.com/Masterminds/semver/v3 v3.2.1
Expand Down
2 changes: 1 addition & 1 deletion sdk/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/sdk

go 1.19
go 1.20

replace go.opentelemetry.io/otel => ../

Expand Down
2 changes: 1 addition & 1 deletion sdk/metric/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/sdk/metric

go 1.19
go 1.20

require (
github.com/go-logr/logr v1.2.4
Expand Down
32 changes: 13 additions & 19 deletions sdk/metric/internal/aggregate/exponential_histogram_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,13 @@ func TestExpoHistogramDataPointRecord(t *testing.T) {
t.Run("int64 MinMaxSum", testExpoHistogramMinMaxSumInt64)
}

// TODO: This can be defined in the test after we drop support for go1.19.
type expoHistogramDataPointRecordTestCase[N int64 | float64] struct {
maxSize int
values []N
expectedBuckets expoBuckets
expectedScale int
}

func testExpoHistogramDataPointRecord[N int64 | float64](t *testing.T) {
testCases := []expoHistogramDataPointRecordTestCase[N]{
testCases := []struct {
maxSize int
values []N
expectedBuckets expoBuckets
expectedScale int
}{
{
maxSize: 4,
values: []N{2, 4, 1},
Expand Down Expand Up @@ -746,15 +743,6 @@ func TestExponentialHistogramAggregation(t *testing.T) {
t.Run("Float64", testExponentialHistogramAggregation[float64])
}

// TODO: This can be defined in the test after we drop support for go1.19.
type exponentialHistogramAggregationTestCase[N int64 | float64] struct {
name string
build func() (Measure[N], ComputeAggregation)
input [][]N
want metricdata.ExponentialHistogram[N]
wantCount int
}

func testExponentialHistogramAggregation[N int64 | float64](t *testing.T) {
const (
maxSize = 4
Expand All @@ -763,7 +751,13 @@ func testExponentialHistogramAggregation[N int64 | float64](t *testing.T) {
noSum = false
)

tests := []exponentialHistogramAggregationTestCase[N]{
tests := []struct {
name string
build func() (Measure[N], ComputeAggregation)
input [][]N
want metricdata.ExponentialHistogram[N]
wantCount int
}{
{
name: "Delta Single",
build: func() (Measure[N], ComputeAggregation) {
Expand Down
2 changes: 1 addition & 1 deletion trace/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/otel/trace

go 1.19
go 1.20

replace go.opentelemetry.io/otel => ../

Expand Down

0 comments on commit 9737995

Please sign in to comment.