Skip to content

Commit 0ae9384

Browse files
authored
Added support for go1.23, bumped the minimum version to 1.22 (open-telemetry#34658)
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
1 parent f1073ef commit 0ae9384

File tree

291 files changed

+337
-310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

291 files changed

+337
-310
lines changed

.chloggen/codeboten_go-1.23.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: breaking
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: all
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Added support for go1.23, bumped the minimum version to 1.22
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [34658]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

.github/workflows/build-and-test-windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
run: Install-WindowsFeature -name Web-Server -IncludeManagementTools
5959
- uses: actions/setup-go@v5
6060
with:
61-
go-version: "1.21.12"
61+
go-version: "1.22.6"
6262
cache: false
6363
- name: Cache Go
6464
id: go-mod-cache

.github/workflows/build-and-test.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: actions/checkout@v4
2727
- uses: actions/setup-go@v5
2828
with:
29-
go-version: "1.21.12"
29+
go-version: "1.22.6"
3030
cache: false
3131
- name: Cache Go
3232
id: go-cache
@@ -92,7 +92,7 @@ jobs:
9292
- uses: actions/checkout@v4
9393
- uses: actions/setup-go@v5
9494
with:
95-
go-version: "1.21.12"
95+
go-version: "1.22.6"
9696
cache: false
9797
- name: Cache Go
9898
id: go-cache
@@ -161,7 +161,7 @@ jobs:
161161
- name: Setup Go
162162
uses: actions/setup-go@v5
163163
with:
164-
go-version: "1.21.12"
164+
go-version: "1.22.6"
165165
cache: false
166166
- name: Cache Go
167167
id: go-cache
@@ -184,7 +184,7 @@ jobs:
184184
- uses: actions/checkout@v4
185185
- uses: actions/setup-go@v5
186186
with:
187-
go-version: "1.21.12"
187+
go-version: "1.22.6"
188188
cache: false
189189
- name: Cache Go
190190
id: go-cache
@@ -253,7 +253,7 @@ jobs:
253253
strategy:
254254
fail-fast: false
255255
matrix:
256-
go-version: ["1.22.5", "1.21.12"] # 1.20 is interpreted as 1.2 without quotes
256+
go-version: ["1.23.0", "1.22.6"] # 1.20 is interpreted as 1.2 without quotes
257257
runner: [ubuntu-latest]
258258
group:
259259
- receiver-0
@@ -302,13 +302,13 @@ jobs:
302302
path: ~/.cache/go-build
303303
key: go-test-build-${{ runner.os }}-${{ matrix.go-version }}-${{ matrix.runner }}-${{ hashFiles('**/go.sum') }}
304304
- name: Run Unit Tests
305-
if: startsWith( matrix.go-version, '1.21' ) != true
305+
if: startsWith( matrix.go-version, '1.22' ) != true
306306
run: make gotest GROUP=${{ matrix.group }}
307307
- name: Run Unit Tests With Coverage
308-
if: startsWith( matrix.go-version, '1.21' ) # only run coverage on one version
308+
if: startsWith( matrix.go-version, '1.22' ) # only run coverage on one version
309309
run: make gotest-with-cover GROUP=${{ matrix.group }}
310310
- uses: actions/upload-artifact@v4
311-
if: startsWith( matrix.go-version, '1.21' ) # only upload artifact for one version
311+
if: startsWith( matrix.go-version, '1.22' ) # only upload artifact for one version
312312
with:
313313
name: coverage-artifacts-${{ matrix.go-version }}-${{ matrix.runner }}-${{ matrix.group }}
314314
path: ${{ matrix.group }}-coverage.txt
@@ -369,7 +369,7 @@ jobs:
369369
- uses: actions/checkout@v4
370370
- uses: actions/setup-go@v5
371371
with:
372-
go-version: "1.21.12"
372+
go-version: "1.22.6"
373373
cache: false
374374
- name: Cache Go
375375
id: go-cache
@@ -407,7 +407,7 @@ jobs:
407407
- uses: actions/checkout@v4
408408
- uses: actions/setup-go@v5
409409
with:
410-
go-version: "1.21.12"
410+
go-version: "1.22.6"
411411
cache: false
412412
- name: Cache Go
413413
id: go-cache
@@ -433,7 +433,7 @@ jobs:
433433
- uses: actions/checkout@v4
434434
- uses: actions/setup-go@v5
435435
with:
436-
go-version: "1.21.12"
436+
go-version: "1.22.6"
437437
cache: false
438438
- name: Cache Go
439439
id: go-cache
@@ -503,7 +503,7 @@ jobs:
503503
- uses: actions/checkout@v4
504504
- uses: actions/setup-go@v5
505505
with:
506-
go-version: "1.21.12"
506+
go-version: "1.22.6"
507507
cache: false
508508
- name: Cache Go
509509
id: go-cache
@@ -604,7 +604,7 @@ jobs:
604604
- uses: actions/checkout@v4
605605
- uses: actions/setup-go@v5
606606
with:
607-
go-version: "1.21.12"
607+
go-version: "1.22.6"
608608
cache: false
609609
- name: Mkdir bin and dist
610610
run: |

.github/workflows/changelog.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
fetch-depth: 0
3434
- uses: actions/setup-go@v5
3535
with:
36-
go-version: "1.21.12"
36+
go-version: "1.22.6"
3737
cache: false
3838
- name: Cache Go
3939
id: go-cache

.github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@v4
2121
- uses: actions/setup-go@v5
2222
with:
23-
go-version: "1.21.12"
23+
go-version: "1.22.6"
2424
cache: false
2525

2626
# Initializes the CodeQL tools for scanning.

.github/workflows/e2e-tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/checkout@v4
2727
- uses: actions/setup-go@v5
2828
with:
29-
go-version: "1.21.12"
29+
go-version: "1.22.6"
3030
cache: false
3131
- name: Cache Go
3232
id: go-cache
@@ -55,7 +55,7 @@ jobs:
5555
- uses: actions/checkout@v4
5656
- uses: actions/setup-go@v5
5757
with:
58-
go-version: "1.21.12"
58+
go-version: "1.22.6"
5959
cache: false
6060
- name: Cache Go
6161
id: go-cache
@@ -87,7 +87,7 @@ jobs:
8787
uses: actions/checkout@v4
8888
- uses: actions/setup-go@v5
8989
with:
90-
go-version: "1.21.12"
90+
go-version: "1.22.6"
9191
cache: false
9292
- name: Cache Go
9393
id: go-cache
@@ -133,7 +133,7 @@ jobs:
133133
- uses: actions/checkout@v4
134134
- uses: actions/setup-go@v5
135135
with:
136-
go-version: "1.21.12"
136+
go-version: "1.22.6"
137137
cache: false
138138
- name: Cache Go
139139
id: go-cache

.github/workflows/load-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v4
2929
- uses: actions/setup-go@v5
3030
with:
31-
go-version: "1.21.12"
31+
go-version: "1.22.6"
3232
cache: false
3333
- name: Cache Go
3434
id: go-cache
@@ -66,7 +66,7 @@ jobs:
6666
- uses: actions/checkout@v4
6767
- uses: actions/setup-go@v5
6868
with:
69-
go-version: "1.21.12"
69+
go-version: "1.22.6"
7070
cache: false
7171
- name: Cache Go
7272
id: go-cache

.github/workflows/prepare-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
path: opentelemetry-collector-contrib
2727
- uses: actions/setup-go@v5
2828
with:
29-
go-version: "1.21.12"
29+
go-version: "1.22.6"
3030
cache: false
3131
- name: Prepare release for contrib
3232
working-directory: opentelemetry-collector-contrib

.github/workflows/prometheus-compliance-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
path: opentelemetry-collector-contrib
3232
- uses: actions/setup-go@v5
3333
with:
34-
go-version: "1.21.12"
34+
go-version: "1.22.6"
3535
cache: false
3636
- name: Cache Go
3737
id: go-cache

.github/workflows/telemetrygen.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v4
2929
- uses: actions/setup-go@v5
3030
with:
31-
go-version: "1.21.12"
31+
go-version: "1.22.6"
3232
cache: false
3333
- name: Cache Go
3434
id: go-cache
@@ -67,7 +67,7 @@ jobs:
6767
- uses: actions/checkout@v4
6868
- uses: actions/setup-go@v5
6969
with:
70-
go-version: "1.21.12"
70+
go-version: "1.22.6"
7171
cache: false
7272
- name: Cache Go
7373
id: go-cache
@@ -112,7 +112,7 @@ jobs:
112112
- uses: actions/checkout@v4
113113
- uses: actions/setup-go@v5
114114
with:
115-
go-version: "1.21.12"
115+
go-version: "1.22.6"
116116
cache: false
117117
- name: Cache Go
118118
id: go-cache

.github/workflows/tidy-dependencies.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
ref: ${{ github.head_ref }}
2222
- uses: actions/setup-go@v5
2323
with:
24-
go-version: "1.21.12"
24+
go-version: "1.22.6"
2525
cache: false
2626
- name: Cache Go
2727
id: go-cache

Makefile.Common

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ govulncheck: $(GOVULNCHECK)
205205
.PHONY: tidy
206206
tidy:
207207
rm -fr go.sum
208-
$(GOCMD) mod tidy -compat=1.21.0
208+
$(GOCMD) mod tidy -compat=1.22.0
209209

210210
.PHONY: misspell
211211
misspell: $(TOOLS_BIN_DIR)/misspell

cmd/githubgen/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/githubgen
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/google/go-github/v63 v63.0.0

cmd/opampsupervisor/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/cenkalti/backoff/v4 v4.3.0

cmd/otelcontribcol/go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/otelcontribcol
44

5-
go 1.21.0
5+
go 1.22.0
66

7-
toolchain go1.21.12
7+
toolchain go1.22.6
88

99
require (
1010
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.107.0

cmd/oteltestbedcol/go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/oteltestbedcol
44

5-
go 1.21.0
5+
go 1.22.0
66

7-
toolchain go1.21.12
7+
toolchain go1.22.6
88

99
require (
1010
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.107.0

cmd/telemetrygen/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0

cmd/telemetrygen/internal/e2etest/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen/internal/e2etest
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen v0.107.0

confmap/provider/s3provider/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/aws/aws-sdk-go-v2 v1.27.0

confmap/provider/secretsmanagerprovider/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/aws/aws-sdk-go-v2/config v1.27.13

connector/countconnector/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.107.0

connector/datadogconnector/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.56.0-rc.11

connector/exceptionsconnector/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.107.0

connector/failoverconnector/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/stretchr/testify v1.9.0

connector/grafanacloudconnector/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/stretchr/testify v1.9.0

connector/otlpjsonconnector/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/otlpjsonconnector
22

3-
go 1.21.0
3+
go 1.22.0
44

55
require (
66
github.com/stretchr/testify v1.9.0

0 commit comments

Comments
 (0)