From b6d4335a722570cb882964fafd533210b68e409a Mon Sep 17 00:00:00 2001 From: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com> Date: Mon, 19 Sep 2022 19:22:40 -0500 Subject: [PATCH] Removes go1.17, replaces with go1.18 (#3179) * Removes go1.17, replaces with go1.18 * Update Changelog Co-authored-by: Chester Cheung Co-authored-by: Tyler Yahn --- .github/workflows/benchmark.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/dependabot.yml | 2 +- CHANGELOG.md | 1 + Makefile | 2 +- README.md | 5 ----- bridge/opencensus/go.mod | 2 +- bridge/opencensus/test/go.mod | 2 +- bridge/opentracing/go.mod | 2 +- example/fib/go.mod | 2 +- example/jaeger/go.mod | 2 +- example/namedtracer/go.mod | 2 +- example/otel-collector/go.mod | 2 +- example/passthrough/go.mod | 2 +- example/zipkin/Dockerfile | 2 +- example/zipkin/go.mod | 2 +- exporters/jaeger/go.mod | 2 +- exporters/otlp/internal/retry/go.mod | 2 +- exporters/otlp/otlptrace/go.mod | 2 +- exporters/otlp/otlptrace/otlptracegrpc/go.mod | 2 +- exporters/otlp/otlptrace/otlptracehttp/go.mod | 2 +- exporters/stdout/stdouttrace/go.mod | 2 +- exporters/zipkin/go.mod | 2 +- go.mod | 2 +- internal/tools/go.mod | 2 +- metric/go.mod | 2 +- schema/go.mod | 2 +- sdk/go.mod | 2 +- sdk/metric/aggregation/aggregation.go | 3 --- sdk/metric/aggregation/aggregation_test.go | 3 --- sdk/metric/metricdata/temporality.go | 2 -- trace/go.mod | 2 +- 32 files changed, 28 insertions(+), 40 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 06d52b94a..a9647ded7 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -4,7 +4,7 @@ on: branches: - main env: - DEFAULT_GO_VERSION: 1.17 + DEFAULT_GO_VERSION: 1.18 jobs: benchmark: name: Benchmarks diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d199d8bc1..81a31e32a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,7 +109,7 @@ jobs: compatibility-test: strategy: matrix: - go-version: [1.19, 1.18, 1.17] + go-version: [1.19, 1.18] os: [ubuntu-latest, macos-latest, windows-latest] # GitHub Actions does not support arm* architectures on default # runners. It is possible to acomplish this with a self-hosted runner diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 763d0427b..b0009e2b3 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -13,7 +13,7 @@ jobs: ref: ${{ github.head_ref }} - uses: actions/setup-go@v3 with: - go-version: '^1.17.0' + go-version: '^1.18.0' - uses: evantorrie/mott-the-tidier@v1-beta id: modtidy with: diff --git a/CHANGELOG.md b/CHANGELOG.md index ce65199d7..434aeae83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - The metric SDK in `go.opentelemetry.io/otel/sdk/metric` is completely refactored to comply with the OpenTelemetry specification. Please see the package documentation for how the new SDK is initialized and configured. (#3175) +- Update the minimum supported go version to go1.18. Removes support for go1.17 (#3179) ### Removed diff --git a/Makefile b/Makefile index 18ffaa33a..07e31965c 100644 --- a/Makefile +++ b/Makefile @@ -156,7 +156,7 @@ go-mod-tidy/%: DIR=$* go-mod-tidy/%: | crosslink @echo "$(GO) mod tidy in $(DIR)" \ && cd $(DIR) \ - && $(GO) mod tidy -compat=1.17 + && $(GO) mod tidy -compat=1.18 .PHONY: lint-modules lint-modules: go-mod-tidy diff --git a/README.md b/README.md index 4aeecb8bf..1b2ee21fb 100644 --- a/README.md +++ b/README.md @@ -52,19 +52,14 @@ Currently, this project supports the following environments. | ------- | ---------- | ------------ | | Ubuntu | 1.19 | amd64 | | Ubuntu | 1.18 | amd64 | -| Ubuntu | 1.17 | amd64 | | Ubuntu | 1.19 | 386 | | Ubuntu | 1.18 | 386 | -| Ubuntu | 1.17 | 386 | | MacOS | 1.19 | amd64 | | MacOS | 1.18 | amd64 | -| MacOS | 1.17 | amd64 | | Windows | 1.19 | amd64 | | Windows | 1.18 | amd64 | -| Windows | 1.17 | amd64 | | Windows | 1.19 | 386 | | Windows | 1.18 | 386 | -| Windows | 1.17 | 386 | While this project should work for other systems, no compatibility guarantees are made for those systems currently. diff --git a/bridge/opencensus/go.mod b/bridge/opencensus/go.mod index 4faa85d36..8e2d09eeb 100644 --- a/bridge/opencensus/go.mod +++ b/bridge/opencensus/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/bridge/opencensus -go 1.17 +go 1.18 require ( go.opencensus.io v0.22.6-0.20201102222123-380f4078db9f diff --git a/bridge/opencensus/test/go.mod b/bridge/opencensus/test/go.mod index 66226d4b6..bc7149de4 100644 --- a/bridge/opencensus/test/go.mod +++ b/bridge/opencensus/test/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/bridge/opencensus/test -go 1.17 +go 1.18 require ( go.opencensus.io v0.23.0 diff --git a/bridge/opentracing/go.mod b/bridge/opentracing/go.mod index c49a89f8d..f76c02533 100644 --- a/bridge/opentracing/go.mod +++ b/bridge/opentracing/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/bridge/opentracing -go 1.17 +go 1.18 replace go.opentelemetry.io/otel => ../.. diff --git a/example/fib/go.mod b/example/fib/go.mod index be627a762..1aab2c165 100644 --- a/example/fib/go.mod +++ b/example/fib/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/example/fib -go 1.17 +go 1.18 require ( go.opentelemetry.io/otel v1.10.0 diff --git a/example/jaeger/go.mod b/example/jaeger/go.mod index 15ea83471..e7e756ce1 100644 --- a/example/jaeger/go.mod +++ b/example/jaeger/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/example/jaeger -go 1.17 +go 1.18 replace ( go.opentelemetry.io/otel => ../.. diff --git a/example/namedtracer/go.mod b/example/namedtracer/go.mod index 41433bff5..51eee8be3 100644 --- a/example/namedtracer/go.mod +++ b/example/namedtracer/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/example/namedtracer -go 1.17 +go 1.18 replace ( go.opentelemetry.io/otel => ../.. diff --git a/example/otel-collector/go.mod b/example/otel-collector/go.mod index 96b14906a..5bce9f3a3 100644 --- a/example/otel-collector/go.mod +++ b/example/otel-collector/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/example/otel-collector -go 1.17 +go 1.18 replace ( go.opentelemetry.io/otel => ../.. diff --git a/example/passthrough/go.mod b/example/passthrough/go.mod index 41a68d3bd..6a53e93e7 100644 --- a/example/passthrough/go.mod +++ b/example/passthrough/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/example/passthrough -go 1.17 +go 1.18 require ( go.opentelemetry.io/otel v1.10.0 diff --git a/example/zipkin/Dockerfile b/example/zipkin/Dockerfile index d79845830..580460973 100644 --- a/example/zipkin/Dockerfile +++ b/example/zipkin/Dockerfile @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.17-alpine +FROM golang:1.18-alpine COPY . /go/src/github.com/open-telemetry/opentelemetry-go/ WORKDIR /go/src/github.com/open-telemetry/opentelemetry-go/example/zipkin/ RUN go install ./main.go diff --git a/example/zipkin/go.mod b/example/zipkin/go.mod index 5650ba002..4ff6a660d 100644 --- a/example/zipkin/go.mod +++ b/example/zipkin/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/example/zipkin -go 1.17 +go 1.18 replace ( go.opentelemetry.io/otel => ../.. diff --git a/exporters/jaeger/go.mod b/exporters/jaeger/go.mod index c16db4e58..5ef177707 100644 --- a/exporters/jaeger/go.mod +++ b/exporters/jaeger/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/exporters/jaeger -go 1.17 +go 1.18 require ( github.com/google/go-cmp v0.5.8 diff --git a/exporters/otlp/internal/retry/go.mod b/exporters/otlp/internal/retry/go.mod index 932a47ef7..639de2b69 100644 --- a/exporters/otlp/internal/retry/go.mod +++ b/exporters/otlp/internal/retry/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/exporters/otlp/internal/retry -go 1.17 +go 1.18 require ( github.com/cenkalti/backoff/v4 v4.1.3 diff --git a/exporters/otlp/otlptrace/go.mod b/exporters/otlp/otlptrace/go.mod index 1c89ad3ba..66c709bcb 100644 --- a/exporters/otlp/otlptrace/go.mod +++ b/exporters/otlp/otlptrace/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/exporters/otlp/otlptrace -go 1.17 +go 1.18 require ( github.com/google/go-cmp v0.5.8 diff --git a/exporters/otlp/otlptrace/otlptracegrpc/go.mod b/exporters/otlp/otlptrace/otlptracegrpc/go.mod index 9e444cbe7..34c5e98e7 100644 --- a/exporters/otlp/otlptrace/otlptracegrpc/go.mod +++ b/exporters/otlp/otlptrace/otlptracegrpc/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc -go 1.17 +go 1.18 require ( github.com/stretchr/testify v1.7.1 diff --git a/exporters/otlp/otlptrace/otlptracehttp/go.mod b/exporters/otlp/otlptrace/otlptracehttp/go.mod index 798b246a7..d765af971 100644 --- a/exporters/otlp/otlptrace/otlptracehttp/go.mod +++ b/exporters/otlp/otlptrace/otlptracehttp/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp -go 1.17 +go 1.18 require ( github.com/stretchr/testify v1.7.1 diff --git a/exporters/stdout/stdouttrace/go.mod b/exporters/stdout/stdouttrace/go.mod index b44e09981..36b130062 100644 --- a/exporters/stdout/stdouttrace/go.mod +++ b/exporters/stdout/stdouttrace/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/exporters/stdout/stdouttrace -go 1.17 +go 1.18 replace ( go.opentelemetry.io/otel => ../../.. diff --git a/exporters/zipkin/go.mod b/exporters/zipkin/go.mod index ca6f259a2..d6aefe4ea 100644 --- a/exporters/zipkin/go.mod +++ b/exporters/zipkin/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/exporters/zipkin -go 1.17 +go 1.18 require ( github.com/google/go-cmp v0.5.8 diff --git a/go.mod b/go.mod index 76dbbbaec..df6d62086 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel -go 1.17 +go 1.18 require ( github.com/go-logr/logr v1.2.3 diff --git a/internal/tools/go.mod b/internal/tools/go.mod index 621cd99bb..8f5ff68ea 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/internal/tools -go 1.17 +go 1.18 require ( github.com/client9/misspell v0.3.4 diff --git a/metric/go.mod b/metric/go.mod index 4ce2adacf..649e18c20 100644 --- a/metric/go.mod +++ b/metric/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/metric -go 1.17 +go 1.18 require ( github.com/stretchr/testify v1.7.1 diff --git a/schema/go.mod b/schema/go.mod index 9114ff31a..f6a0fb338 100644 --- a/schema/go.mod +++ b/schema/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/schema -go 1.17 +go 1.18 require ( github.com/Masterminds/semver/v3 v3.1.1 diff --git a/sdk/go.mod b/sdk/go.mod index 6a9bfa821..1d2a7e828 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/sdk -go 1.17 +go 1.18 replace go.opentelemetry.io/otel => ../ diff --git a/sdk/metric/aggregation/aggregation.go b/sdk/metric/aggregation/aggregation.go index 1eb2c3486..e1da10f53 100644 --- a/sdk/metric/aggregation/aggregation.go +++ b/sdk/metric/aggregation/aggregation.go @@ -12,9 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.17 -// +build go1.17 - // Package aggregation contains configuration types that define the // aggregation operation used to summarizes recorded measurements. package aggregation // import "go.opentelemetry.io/otel/sdk/metric/aggregation" diff --git a/sdk/metric/aggregation/aggregation_test.go b/sdk/metric/aggregation/aggregation_test.go index 772d7ea8f..0f2846d3a 100644 --- a/sdk/metric/aggregation/aggregation_test.go +++ b/sdk/metric/aggregation/aggregation_test.go @@ -12,9 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.17 -// +build go1.17 - package aggregation import ( diff --git a/sdk/metric/metricdata/temporality.go b/sdk/metric/metricdata/temporality.go index 5cf105b79..9fceb18cb 100644 --- a/sdk/metric/metricdata/temporality.go +++ b/sdk/metric/metricdata/temporality.go @@ -13,8 +13,6 @@ // limitations under the License. //go:generate stringer -type=Temporality -//go:build go1.17 -// +build go1.17 package metricdata // import "go.opentelemetry.io/otel/sdk/metric/metricdata" diff --git a/trace/go.mod b/trace/go.mod index d4b34f0cc..95fba71a8 100644 --- a/trace/go.mod +++ b/trace/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/otel/trace -go 1.17 +go 1.18 replace go.opentelemetry.io/otel => ../