Skip to content

Commit

Permalink
bump minimum supported go version to 1.23 (open-telemetry#12370)
Browse files Browse the repository at this point in the history
With the release of 1.24, we need to bump the tested versions.

---------

Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten authored Feb 12, 2025
1 parent d668e74 commit e4b9425
Show file tree
Hide file tree
Showing 96 changed files with 129 additions and 104 deletions.
25 changes: 25 additions & 0 deletions .chloggen/codeboten_1.24.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: all

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Added support for go1.24, bumped minimum version to 1.23

# One or more tracking issues or pull requests related to the change
issues: [12370]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
2 changes: 1 addition & 1 deletion .github/workflows/api-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6

# Generate apidiff states of Main
- name: Generate-States
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
cache: false
- name: Cache Go
id: go-cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
cache: false
- name: Cache Go
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
cache: false
- name: Cache Go
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -70,7 +70,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -95,7 +95,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
strategy:
matrix:
runner: [ubuntu-latest]
go-version: ["~1.23", "~1.22"] # 1.20 needs quotes otherwise it's interpreted as 1.2
go-version: ["~1.24", "~1.23"] # 1.20 needs quotes otherwise it's interpreted as 1.2
runs-on: ${{ matrix.runner }}
needs: [setup-environment]
steps:
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
cache: false
- name: Cache Go
id: go-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/builder-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
- name: Test
run: make builder-integration-test
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
- name: Cache Go
id: go-cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contrib-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
cache: false
- name: Run Contrib Tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6

- name: Run benchmark
run: make gobenchmark
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
# Prepare Core for release.
# - Update CHANGELOG.md file, this is done via chloggen
# - Run make prepare-release PREVIOUS_VERSION=1.0.0 RELEASE_CANDIDATE=1.1.0 MODSET=stable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tidy-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
ref: ${{ github.head_ref }}
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ~1.22.12
go-version: ~1.23.6
cache: false
- name: Cache Go
id: go-cache
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ section of the general project contributing guide.
Working with the project sources requires the following tools:

1. [git](https://git-scm.com/)
2. [go](https://golang.org/) (version 1.22 and up)
2. [go](https://golang.org/) (version 1.23 and up)
3. [make](https://www.gnu.org/software/make/)
4. [docker](https://www.docker.com/)

Expand Down Expand Up @@ -249,7 +249,7 @@ before merging (but see the above paragraph about writing good commit messages i

## General Notes

This project uses Go 1.22.* and [Github Actions.](https://github.com/features/actions)
This project uses Go 1.23.* and [Github Actions.](https://github.com/features/actions)

It is recommended to run `make gofmt all` before submitting your PR.

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

go 1.22.0
go 1.23.0

require (
github.com/stretchr/testify v1.10.0
Expand Down
2 changes: 1 addition & 1 deletion cmd/builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ go install go.opentelemetry.io/collector/cmd/builder@latest

If installing through this method the binary will be called `builder`.

Please note that the `go.mod` file generated uses `go 1.22` as the version. Versions 1.22.3, 1.21.10, and prior of Go [do not recognize this as a valid go version](https://github.com/golang/go/commit/27ed85d4d1702e868730ab6ea2ad6326988c615c). In order to successfully generate and build a collector using ocb, you must use Go version 1.22.4+, or any version of Go 1.23 and beyond.
In order to successfully generate and build a collector using ocb, you must use [compatible Go version](../../README.md#compatibility).

## Running

Expand Down
2 changes: 1 addition & 1 deletion cmd/builder/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

module go.opentelemetry.io/collector/cmd/builder

go 1.22.0
go 1.23.0

require (
github.com/knadh/koanf/parsers/yaml v0.1.0
Expand Down
2 changes: 1 addition & 1 deletion cmd/mdatagen/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/cmd/mdatagen

go 1.22.0
go 1.23.0

require (
github.com/google/go-cmp v0.6.0
Expand Down
4 changes: 2 additions & 2 deletions cmd/otelcorecol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

module go.opentelemetry.io/collector/cmd/otelcorecol

go 1.22.0
go 1.23.0

toolchain go1.22.12
toolchain go1.23.6

require (
go.opentelemetry.io/collector/component v0.119.0
Expand Down
2 changes: 1 addition & 1 deletion component/componentstatus/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/component/componentstatus

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

require (
github.com/mostynb/go-grpc-compression v1.2.3
Expand Down
2 changes: 1 addition & 1 deletion config/confighttp/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/config/confighttp

go 1.22.0
go 1.23.0

require (
github.com/golang/snappy v0.0.4
Expand Down
2 changes: 1 addition & 1 deletion config/confighttp/xconfighttp/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/config/confighttp/xconfighttp

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

require (
github.com/go-viper/mapstructure/v2 v2.2.1
Expand Down
2 changes: 1 addition & 1 deletion confmap/internal/e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/confmap/internal/e2e

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

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

go 1.22.0
go 1.23.0

require (
github.com/stretchr/testify v1.10.0
Expand Down
Loading

0 comments on commit e4b9425

Please sign in to comment.