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

Drop support for Go 1.19 #4481

Merged
merged 6 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 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
31 changes: 13 additions & 18 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 @@ -747,14 +744,6 @@ func TestExponentialHistogramAggregation(t *testing.T) {
}

// 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 +752,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