Skip to content

Commit

Permalink
Added support for go1.23, bumped the minimum version to 1.22 (open-te…
Browse files Browse the repository at this point in the history
…lemetry#34658)

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
  • Loading branch information
codeboten authored Aug 13, 2024
1 parent f1073ef commit 0ae9384
Show file tree
Hide file tree
Showing 291 changed files with 337 additions and 310 deletions.
27 changes: 27 additions & 0 deletions .chloggen/codeboten_go-1.23.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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. filelogreceiver)
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.23, bumped the minimum version to 1.22

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [34658]

# (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:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# 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/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: Install-WindowsFeature -name Web-Server -IncludeManagementTools
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-mod-cache
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -184,7 +184,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ["1.22.5", "1.21.12"] # 1.20 is interpreted as 1.2 without quotes
go-version: ["1.23.0", "1.22.6"] # 1.20 is interpreted as 1.2 without quotes
runner: [ubuntu-latest]
group:
- receiver-0
Expand Down Expand Up @@ -302,13 +302,13 @@ jobs:
path: ~/.cache/go-build
key: go-test-build-${{ runner.os }}-${{ matrix.go-version }}-${{ matrix.runner }}-${{ hashFiles('**/go.sum') }}
- name: Run Unit Tests
if: startsWith( matrix.go-version, '1.21' ) != true
if: startsWith( matrix.go-version, '1.22' ) != true
run: make gotest GROUP=${{ matrix.group }}
- name: Run Unit Tests With Coverage
if: startsWith( matrix.go-version, '1.21' ) # only run coverage on one version
if: startsWith( matrix.go-version, '1.22' ) # only run coverage on one version
run: make gotest-with-cover GROUP=${{ matrix.group }}
- uses: actions/upload-artifact@v4
if: startsWith( matrix.go-version, '1.21' ) # only upload artifact for one version
if: startsWith( matrix.go-version, '1.22' ) # only upload artifact for one version
with:
name: coverage-artifacts-${{ matrix.go-version }}-${{ matrix.runner }}-${{ matrix.group }}
path: ${{ matrix.group }}-coverage.txt
Expand Down Expand Up @@ -369,7 +369,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -407,7 +407,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -433,7 +433,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -503,7 +503,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -604,7 +604,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Mkdir bin and dist
run: |
Expand Down
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:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
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 @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false

# Initializes the CodeQL tools for scanning.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
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 @@ -26,7 +26,7 @@ jobs:
path: opentelemetry-collector-contrib
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Prepare release for contrib
working-directory: opentelemetry-collector-contrib
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prometheus-compliance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
path: opentelemetry-collector-contrib
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/telemetrygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
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 @@ -21,7 +21,7 @@ jobs:
ref: ${{ github.head_ref }}
- uses: actions/setup-go@v5
with:
go-version: "1.21.12"
go-version: "1.22.6"
cache: false
- name: Cache Go
id: go-cache
Expand Down
2 changes: 1 addition & 1 deletion Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ govulncheck: $(GOVULNCHECK)
.PHONY: tidy
tidy:
rm -fr go.sum
$(GOCMD) mod tidy -compat=1.21.0
$(GOCMD) mod tidy -compat=1.22.0

.PHONY: misspell
misspell: $(TOOLS_BIN_DIR)/misspell
Expand Down
2 changes: 1 addition & 1 deletion cmd/githubgen/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/githubgen

go 1.21.0
go 1.22.0

require (
github.com/google/go-github/v63 v63.0.0
Expand Down
2 changes: 1 addition & 1 deletion cmd/opampsupervisor/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor

go 1.21.0
go 1.22.0

require (
github.com/cenkalti/backoff/v4 v4.3.0
Expand Down
4 changes: 2 additions & 2 deletions cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

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

go 1.21.0
go 1.22.0

toolchain go1.21.12
toolchain go1.22.6

require (
github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.107.0
Expand Down
4 changes: 2 additions & 2 deletions cmd/oteltestbedcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

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

go 1.21.0
go 1.22.0

toolchain go1.21.12
toolchain go1.22.6

require (
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/carbonexporter v0.107.0
Expand Down
2 changes: 1 addition & 1 deletion cmd/telemetrygen/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen

go 1.21.0
go 1.22.0

require (
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
Expand Down
2 changes: 1 addition & 1 deletion cmd/telemetrygen/internal/e2etest/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen/internal/e2etest

go 1.21.0
go 1.22.0

require (
github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen v0.107.0
Expand Down
2 changes: 1 addition & 1 deletion confmap/provider/s3provider/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider

go 1.21.0
go 1.22.0

require (
github.com/aws/aws-sdk-go-v2 v1.27.0
Expand Down
2 changes: 1 addition & 1 deletion confmap/provider/secretsmanagerprovider/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider

go 1.21.0
go 1.22.0

require (
github.com/aws/aws-sdk-go-v2/config v1.27.13
Expand Down
2 changes: 1 addition & 1 deletion connector/countconnector/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector

go 1.21.0
go 1.22.0

require (
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.107.0
Expand Down
2 changes: 1 addition & 1 deletion connector/datadogconnector/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector

go 1.21.0
go 1.22.0

require (
github.com/DataDog/datadog-agent/comp/otelcol/otlp/components/metricsclient v0.56.0-rc.11
Expand Down
2 changes: 1 addition & 1 deletion connector/exceptionsconnector/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector

go 1.21.0
go 1.22.0

require (
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.107.0
Expand Down
2 changes: 1 addition & 1 deletion connector/failoverconnector/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/failoverconnector

go 1.21.0
go 1.22.0

require (
github.com/stretchr/testify v1.9.0
Expand Down
2 changes: 1 addition & 1 deletion connector/grafanacloudconnector/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector

go 1.21.0
go 1.22.0

require (
github.com/stretchr/testify v1.9.0
Expand Down
2 changes: 1 addition & 1 deletion connector/otlpjsonconnector/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/connector/otlpjsonconnector

go 1.21.0
go 1.22.0

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

0 comments on commit 0ae9384

Please sign in to comment.