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

[all] bump minimum go version to 1.21 #31109

Merged
merged 5 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 27 additions & 0 deletions .chloggen/codeboten_go-1.22.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: Bump minimum version to go 1.21

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

# (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 @@ -50,7 +50,7 @@ jobs:
run: Install-WindowsFeature -name Web-Server -IncludeManagementTools
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
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.20.12
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.11
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -177,7 +177,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
unittest-matrix:
strategy:
matrix:
go-version: ["~1.22", "~1.21.5", "~1.20.12"] # 1.20 is interpreted as 1.2 without quotes
go-version: ["~1.22", "~1.21.5"] # 1.20 is interpreted as 1.2 without quotes
group:
- receiver-0
- receiver-1
Expand Down Expand Up @@ -282,13 +282,13 @@ jobs:
path: ~/.cache/go-build
key: go-test-build-${{ runner.os }}-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
- name: Run Unit Tests
if: startsWith( matrix.go-version, '~1.20' ) != true # every other version
if: startsWith( matrix.go-version, '~1.21' ) != true
run: make gotest GROUP=${{ matrix.group }}
- name: Run Unit Tests With Coverage
if: startsWith( matrix.go-version, '~1.20' ) # only run coverage on one version
if: startsWith( matrix.go-version, '~1.21' ) # only run coverage on one version
run: make gotest-with-cover GROUP=${{ matrix.group }}
- uses: actions/upload-artifact@v3
if: startsWith( matrix.go-version, '~1.20' ) # only upload one artifact
if: startsWith( matrix.go-version, '~1.21' ) # only upload artifact for one version
with:
name: coverage-artifacts
path: ${{ matrix.group }}-coverage.txt
Expand Down Expand Up @@ -349,7 +349,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -387,7 +387,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand All @@ -413,7 +413,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -482,7 +482,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -615,7 +615,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
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 @@ -34,7 +34,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
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 @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
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 @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.8
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.8
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
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 @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
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.20.12
go-version: ~1.21.5
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 @@ -26,7 +26,7 @@ jobs:
path: opentelemetry-collector-contrib
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
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 @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
cache: false
- name: Cache Go
id: go-cache
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ~1.20.12
go-version: ~1.21.5
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.20.12
go-version: ~1.21.5
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 @@ -203,7 +203,7 @@ govulncheck: $(GOVULNCHECK)
.PHONY: tidy
tidy:
rm -fr go.sum
$(GOCMD) mod tidy -compat=1.20
$(GOCMD) mod tidy -compat=1.21

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

go 1.20
go 1.21

require (
github.com/fatih/structtag v1.2.0
Expand Down
Loading
Loading