Skip to content

Commit abd004b

Browse files
feat: bump v1 to Go 1.23 (#2289)
1 parent f678d46 commit abd004b

File tree

5 files changed

+108
-111
lines changed

5 files changed

+108
-111
lines changed

β€Ž.github/workflows/coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Go
2323
uses: actions/setup-go@v3
2424
with:
25-
go-version: "1.22"
25+
go-version: "1.23"
2626

2727
- name: Checkout base branch
2828
uses: actions/checkout@v3

β€Ž.github/workflows/lint.yaml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,34 @@ jobs:
2424
name: run lint
2525
runs-on: ubuntu-latest
2626
steps:
27-
- name: Setup Go
28-
uses: actions/setup-go@v3
29-
with:
30-
go-version: "1.22"
31-
- name: Install goimports
32-
run: go install golang.org/x/tools/cmd/goimports@latest
33-
- name: Checkout code
34-
uses: actions/checkout@v3
35-
with:
36-
ref: ${{ github.event.pull_request.head.sha }}
37-
repository: ${{ github.event.pull_request.head.repo.full_name }}
38-
- run: goimports -w .
39-
- run: go mod tidy
40-
- name: Verify no changes from goimports and go mod tidy. If you're reading this and the check has failed, run `goimports -w . && go mod tidy`.
41-
run: git diff --exit-code
42-
- name: Remove PR Label
43-
if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
44-
uses: actions/github-script@v6
45-
with:
46-
github-token: ${{ secrets.GITHUB_TOKEN }}
47-
script: |
48-
try {
49-
await github.rest.issues.removeLabel({
50-
name: 'tests: run',
51-
owner: context.repo.owner,
52-
repo: context.repo.repo,
53-
issue_number: context.payload.pull_request.number
54-
});
55-
} catch (e) {
56-
console.log('Failed to remove label. Another job may have already removed it!');
57-
}
27+
- name: Setup Go
28+
uses: actions/setup-go@v3
29+
with:
30+
go-version: "1.23"
31+
- name: Install goimports
32+
run: go install golang.org/x/tools/cmd/goimports@latest
33+
- name: Checkout code
34+
uses: actions/checkout@v3
35+
with:
36+
ref: ${{ github.event.pull_request.head.sha }}
37+
repository: ${{ github.event.pull_request.head.repo.full_name }}
38+
- run: goimports -w .
39+
- run: go mod tidy
40+
- name: Verify no changes from goimports and go mod tidy. If you're reading this and the check has failed, run `goimports -w . && go mod tidy`.
41+
run: git diff --exit-code
42+
- name: Remove PR Label
43+
if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
44+
uses: actions/github-script@v6
45+
with:
46+
github-token: ${{ secrets.GITHUB_TOKEN }}
47+
script: |
48+
try {
49+
await github.rest.issues.removeLabel({
50+
name: 'tests: run',
51+
owner: context.repo.owner,
52+
repo: context.repo.repo,
53+
issue_number: context.payload.pull_request.number
54+
});
55+
} catch (e) {
56+
console.log('Failed to remove label. Another job may have already removed it!');
57+
}

β€Ž.github/workflows/tests.yaml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@ name: tests
1616
on:
1717
push:
1818
branches:
19-
- 'v1'
19+
- "v1"
2020
pull_request:
2121
pull_request_target:
2222
types: [labeled]
2323

2424
jobs:
2525
unit:
26-
# run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
26+
# run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
2727
if: "${{ (github.event.action != 'labeled' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) || github.event.label.name == 'tests: run' }}"
2828
name: unit tests
2929
runs-on: "ubuntu-latest"
3030
strategy:
3131
matrix:
32-
go-version: ["1.20", "1.22"]
32+
go-version: ["1.21", "1.23"]
3333
fail-fast: false
3434
permissions:
35-
contents: 'read'
36-
id-token: 'write'
35+
contents: "read"
36+
id-token: "write"
3737
steps:
3838
- name: Remove PR label
3939
if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
@@ -53,7 +53,7 @@ jobs:
5353
}
5454
5555
- name: Checkout code
56-
uses: 'actions/checkout@v3'
56+
uses: "actions/checkout@v3"
5757
with:
5858
ref: ${{ github.event.pull_request.head.sha }}
5959
repository: ${{ github.event.pull_request.head.repo.full_name }}
@@ -63,9 +63,9 @@ jobs:
6363
with:
6464
go-version: ${{ matrix.go-version }}
6565

66-
- id: 'auth'
67-
name: 'Authenticate to Google Cloud'
68-
uses: 'google-github-actions/auth@v0.8.0'
66+
- id: "auth"
67+
name: "Authenticate to Google Cloud"
68+
uses: "google-github-actions/auth@v0.8.0"
6969
with:
7070
workload_identity_provider: ${{ secrets.PROVIDER_NAME }}
7171
service_account: ${{ secrets.SERVICE_ACCOUNT }}
@@ -87,7 +87,7 @@ jobs:
8787
./flakybot --repo ${{github.repository}} --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
8888
8989
integration:
90-
# run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
90+
# run job on proper workflow event triggers (skip job for pull_request event from forks and only run pull_request_target for "tests: run" label)
9191
if: "${{ (github.event.action != 'labeled' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name) || github.event.label.name == 'tests: run' }}"
9292
name: integration tests
9393
runs-on: ${{ matrix.os }}
@@ -96,8 +96,8 @@ jobs:
9696
os: [macos-latest, windows-latest, ubuntu-latest]
9797
fail-fast: false
9898
permissions:
99-
contents: 'read'
100-
id-token: 'write'
99+
contents: "read"
100+
id-token: "write"
101101
steps:
102102
- name: Remove PR label
103103
if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}"
@@ -117,27 +117,27 @@ jobs:
117117
}
118118
119119
- name: Checkout code
120-
uses: 'actions/checkout@v3'
120+
uses: "actions/checkout@v3"
121121
with:
122122
ref: ${{ github.event.pull_request.head.sha }}
123123
repository: ${{ github.event.pull_request.head.repo.full_name }}
124124

125125
- name: Setup Go
126126
uses: actions/setup-go@v3
127127
with:
128-
go-version: "1.22"
128+
go-version: "1.23"
129129

130-
- id: 'auth'
131-
name: 'Authenticate to Google Cloud'
132-
uses: 'google-github-actions/auth@v0.8.0'
130+
- id: "auth"
131+
name: "Authenticate to Google Cloud"
132+
uses: "google-github-actions/auth@v0.8.0"
133133
with:
134134
workload_identity_provider: ${{ secrets.PROVIDER_NAME }}
135135
service_account: ${{ secrets.SERVICE_ACCOUNT }}
136136
access_token_lifetime: 600s
137137

138-
- id: 'secrets'
138+
- id: "secrets"
139139
name: Get secrets
140-
uses: 'google-github-actions/get-secretmanager-secrets@v0.5.0'
140+
uses: "google-github-actions/get-secretmanager-secrets@v0.5.0"
141141
with:
142142
secrets: |-
143143
MYSQL_CONNECTION_NAME:${{ secrets.GOOGLE_CLOUD_PROJECT }}/MYSQL_CONNECTION_NAME
@@ -161,20 +161,20 @@ jobs:
161161
162162
- name: Run tests
163163
env:
164-
GOOGLE_CLOUD_PROJECT: '${{ secrets.GOOGLE_CLOUD_PROJECT }}'
165-
MYSQL_CONNECTION_NAME: '${{ steps.secrets.outputs.MYSQL_CONNECTION_NAME }}'
166-
MYSQL_USER: '${{ steps.secrets.outputs.MYSQL_USER }}'
167-
MYSQL_PASS: '${{ steps.secrets.outputs.MYSQL_PASS }}'
168-
MYSQL_DB: '${{ steps.secrets.outputs.MYSQL_DB }}'
169-
POSTGRES_CONNECTION_NAME: '${{ steps.secrets.outputs.POSTGRES_CONNECTION_NAME }}'
170-
POSTGRES_USER: '${{ steps.secrets.outputs.POSTGRES_USER }}'
171-
POSTGRES_USER_IAM: '${{ steps.secrets.outputs.POSTGRES_USER_IAM }}'
172-
POSTGRES_PASS: '${{ steps.secrets.outputs.POSTGRES_PASS }}'
173-
POSTGRES_DB: '${{ steps.secrets.outputs.POSTGRES_DB }}'
174-
SQLSERVER_CONNECTION_NAME: '${{ steps.secrets.outputs.SQLSERVER_CONNECTION_NAME }}'
175-
SQLSERVER_USER: '${{ steps.secrets.outputs.SQLSERVER_USER }}'
176-
SQLSERVER_PASS: '${{ steps.secrets.outputs.SQLSERVER_PASS }}'
177-
SQLSERVER_DB: '${{ steps.secrets.outputs.SQLSERVER_DB }}'
164+
GOOGLE_CLOUD_PROJECT: "${{ secrets.GOOGLE_CLOUD_PROJECT }}"
165+
MYSQL_CONNECTION_NAME: "${{ steps.secrets.outputs.MYSQL_CONNECTION_NAME }}"
166+
MYSQL_USER: "${{ steps.secrets.outputs.MYSQL_USER }}"
167+
MYSQL_PASS: "${{ steps.secrets.outputs.MYSQL_PASS }}"
168+
MYSQL_DB: "${{ steps.secrets.outputs.MYSQL_DB }}"
169+
POSTGRES_CONNECTION_NAME: "${{ steps.secrets.outputs.POSTGRES_CONNECTION_NAME }}"
170+
POSTGRES_USER: "${{ steps.secrets.outputs.POSTGRES_USER }}"
171+
POSTGRES_USER_IAM: "${{ steps.secrets.outputs.POSTGRES_USER_IAM }}"
172+
POSTGRES_PASS: "${{ steps.secrets.outputs.POSTGRES_PASS }}"
173+
POSTGRES_DB: "${{ steps.secrets.outputs.POSTGRES_DB }}"
174+
SQLSERVER_CONNECTION_NAME: "${{ steps.secrets.outputs.SQLSERVER_CONNECTION_NAME }}"
175+
SQLSERVER_USER: "${{ steps.secrets.outputs.SQLSERVER_USER }}"
176+
SQLSERVER_PASS: "${{ steps.secrets.outputs.SQLSERVER_PASS }}"
177+
SQLSERVER_DB: "${{ steps.secrets.outputs.SQLSERVER_DB }}"
178178
TMPDIR: "/tmp"
179179
run: |
180180
go install github.com/jstemmer/go-junit-report/v2@latest

β€Žgo.mod

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,27 @@ require (
1111
github.com/lib/pq v1.10.9
1212
github.com/microsoft/go-mssqldb v1.7.2
1313
go.uber.org/zap v1.27.0
14-
golang.org/x/net v0.27.0
15-
golang.org/x/oauth2 v0.21.0
16-
golang.org/x/sys v0.22.0
17-
golang.org/x/time v0.5.0
18-
google.golang.org/api v0.188.0
14+
golang.org/x/net v0.28.0
15+
golang.org/x/oauth2 v0.22.0
16+
golang.org/x/sys v0.24.0
17+
golang.org/x/time v0.6.0
18+
google.golang.org/api v0.192.0
1919
)
2020

2121
require (
22-
cloud.google.com/go/auth v0.7.0 // indirect
23-
cloud.google.com/go/auth/oauth2adapt v0.2.2 // indirect
22+
cloud.google.com/go/auth v0.8.1 // indirect
23+
cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect
2424
filippo.io/edwards25519 v1.1.0 // indirect
2525
github.com/felixge/httpsnoop v1.0.4 // indirect
26-
github.com/go-logr/logr v1.4.1 // indirect
26+
github.com/go-logr/logr v1.4.2 // indirect
2727
github.com/go-logr/stdr v1.2.2 // indirect
2828
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
2929
github.com/golang-sql/sqlexp v0.1.0 // indirect
3030
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
31-
github.com/golang/protobuf v1.5.4 // indirect
32-
github.com/google/s2a-go v0.1.7 // indirect
31+
github.com/google/s2a-go v0.1.8 // indirect
3332
github.com/google/uuid v1.6.0 // indirect
3433
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
35-
github.com/googleapis/gax-go/v2 v2.12.5 // indirect
34+
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
3635
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
3736
github.com/jackc/pgconn v1.14.3 // indirect
3837
github.com/jackc/pgio v1.0.0 // indirect
@@ -48,10 +47,10 @@ require (
4847
go.opentelemetry.io/otel/metric v1.24.0 // indirect
4948
go.opentelemetry.io/otel/trace v1.24.0 // indirect
5049
go.uber.org/multierr v1.10.0 // indirect
51-
golang.org/x/crypto v0.25.0 // indirect
52-
golang.org/x/text v0.16.0 // indirect
53-
google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect
54-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b // indirect
50+
golang.org/x/crypto v0.26.0 // indirect
51+
golang.org/x/text v0.17.0 // indirect
52+
google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f // indirect
53+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect
5554
google.golang.org/grpc v1.64.1 // indirect
5655
google.golang.org/protobuf v1.34.2 // indirect
5756
)

0 commit comments

Comments
 (0)