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

[go] upgrade to 1.23 #283

Merged
merged 57 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
86396d0
build: go.mod upgrade and update to 1.23
fin09pcap Oct 31, 2024
43b97fb
build: update tools/go.mod
fin09pcap Oct 31, 2024
481500c
build: update allowed compilers for 1.23
fin09pcap Oct 31, 2024
d7d4cbb
fix: update golang version to 1.23.2
fin09pcap Oct 31, 2024
70a8fff
chore: fmt
fin09pcap Oct 31, 2024
412c880
chore: generate
fin09pcap Oct 31, 2024
e49d405
chore: fmt
fin09pcap Oct 31, 2024
17609cb
fix: update paseto transformer with required inputs
fin09pcap Oct 31, 2024
851cdd6
fix: disable test:cli
fin09pcap Nov 10, 2024
6221084
build: update .golangci.yml for deprecations
fin09pcap Nov 10, 2024
11604b7
chore: spelling
fin09pcap Nov 10, 2024
0191401
chore: revive for args variable
fin09pcap Nov 17, 2024
16ec05d
chore: revive
fin09pcap Nov 17, 2024
b7bebcd
fix: error check for fernet keygeneration output
fin09pcap Nov 17, 2024
bbcb9f1
fix: rand.Seed deprecated
fin09pcap Nov 17, 2024
07b7aff
build dump golangci-lint v1.62.2
fin09pcap Dec 1, 2024
b674ee7
chore: golangci-lint update
fin09pcap Dec 5, 2024
626fb7f
chore: generate api
fin09pcap Dec 5, 2024
3cf35e7
chore: staticcheck
fin09pcap Dec 5, 2024
3d6329f
chore: golangci-lint revive
fin09pcap Dec 5, 2024
158f3d3
chore: licenser
fin09pcap Dec 5, 2024
a916f49
fix: update celPackageGetSecret with correct type
fin09pcap Dec 5, 2024
a283a90
chore: golangci-lint revive
fin09pcap Dec 5, 2024
94bfd9d
chore: golangci-lint
fin09pcap Dec 5, 2024
b46c31d
build: update for multiarchitecture builds
fin09pcap Dec 5, 2024
71fc66c
test: update failing tests
fin09pcap Dec 5, 2024
5d50ab7
build: udpate release github action workflow
fin09pcap Dec 5, 2024
79aa511
build: udpate go github action workflow
fin09pcap Dec 5, 2024
206cb5d
build: update github action workflow for go 1.23
fin09pcap Dec 5, 2024
d1d013f
test: trigger
fin09pcap Dec 5, 2024
562697e
chore: copyloopvar
fin09pcap Dec 5, 2024
6469314
build: bump versions for github actions
fin09pcap Dec 5, 2024
12b6dab
test: trigger
fin09pcap Dec 5, 2024
bb410a4
build: adjust gotestsum reference
fin09pcap Dec 5, 2024
f627cac
chore: spelling
fin09pcap Dec 5, 2024
1064f74
build: upgrade go.mod
fin09pcap Dec 5, 2024
b645cfe
build: bump containerd/containerd to 1.7.24
fin09pcap Dec 12, 2024
8699086
build: update github.com/containerd/imgcrypt
fin09pcap Dec 12, 2024
b51039f
build: bump github.com/golang-jwt/jwt/v4
fin09pcap Dec 12, 2024
0c42f0d
fix: remove reference to SSL30
fin09pcap Dec 12, 2024
fb15131
build: go module updates
fin09pcap Dec 12, 2024
53d9575
Merge branch 'main' into go123/upgrade
fin09pcap Dec 12, 2024
4a40fd0
buld: update depdendency packages
fin09pcap Jan 23, 2025
04ab705
build: update security workflow for go1.23
fin09pcap Jan 23, 2025
788e5b7
fix: update bundle-remapper example
fin09pcap Jan 23, 2025
d7cc95e
chore: update CODEOWNERS
fin09pcap Jan 23, 2025
f69c37b
build: remove Zenithar as codeowner
fin09pcap Jan 23, 2025
3caf045
build: bump k8s.io/apiserver to v0.32.1
fin09pcap Jan 23, 2025
86bf78f
build: bump github.com/golang-jwt/jwt/v4 to v4.5.1
fin09pcap Jan 23, 2025
609e141
build: update github.com/containerd/imgcrypt@v1.1.11
fin09pcap Jan 23, 2025
d626a52
build: update github.com/containerd/containerd v1.7.25
fin09pcap Jan 23, 2025
23afe68
chore: go mod tidy
fin09pcap Jan 23, 2025
24b4e1a
build: update .nancy-ignore for unused packages
fin09pcap Jan 26, 2025
caaf855
build: update golangci configuration
fin09pcap Jan 26, 2025
ab293e4
chore: golangci funlen not used
fin09pcap Jan 26, 2025
4ad565c
chore: golangci funlen not used
fin09pcap Jan 26, 2025
ab2b508
build: update tools for golangci-lint for github dependency matching
fin09pcap Jan 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @Zenithar
* @fin09pcap
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.23
fin09pcap marked this conversation as resolved.
Show resolved Hide resolved
-
name: Build Harp
run: |
Expand Down
61 changes: 30 additions & 31 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,50 +26,49 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
# Check if there any dirty change for go mod tidy
# Check if there are any dirty change for go mod tidy
go-mod:
name: "Check go modules declaration"
runs-on: ubuntu-latest
steps:
-
name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.23
-
name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Check go mod and go.sum
run: |
go mod tidy -v
git --no-pager diff go.mod go.sum
git --no-pager diff --quiet go.mod go.sum

# Try compile all binaries first
# Try to compile all binaries first
compile-dryrun:
name: "Compile"
strategy:
fail-fast: true
matrix:
go-version:
- "1.19"
- "1.18.10"
- "1.23.2"
runs-on: ubuntu-latest
needs: [golangci-lint, go-mod]
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
check-latest: true
-
name: Cache Go modules
uses: actions/cache@v3.0.3
uses: actions/cache@v4.2.0
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -90,14 +89,14 @@ jobs:
steps:
-
name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.23
-
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Lint code
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout=10m
Expand All @@ -109,15 +108,15 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.23
-
name: Cache Go modules
uses: actions/cache@v3.0.3
uses: actions/cache@v4.2.0
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -128,9 +127,9 @@ jobs:
run: go mod download
-
name: Setup gotestsum
uses: autero1/action-gotestsum@v1.0.0
uses: autero1/action-gotestsum@v2.0.0
with:
gotestsum_version: 1.7.0
gotestsum_version: 1.12.0
-
name: Run tests
run: gotestsum --format short-verbose ./pkg/...
Expand All @@ -142,12 +141,12 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.23.2
-
name: Cache Go modules
uses: actions/cache@v3.0.3
Expand All @@ -161,9 +160,9 @@ jobs:
run: go mod download
-
name: Setup gotestsum
uses: autero1/action-gotestsum@v1.0.0
uses: autero1/action-gotestsum@v2.0.0
with:
gotestsum_version: 1.7.0
gotestsum_version: 1.12.0
-
name: Run tests
run: gotestsum --format short-verbose ./pkg/...
Expand All @@ -175,15 +174,15 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.23.2
-
name: Cache Go modules
uses: actions/cache@v3.0.3
uses: actions/cache@v4.2.0
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -194,9 +193,9 @@ jobs:
run: go mod download
-
name: Setup gotestsum
uses: autero1/action-gotestsum@v1.0.0
uses: autero1/action-gotestsum@v2.0.0
with:
gotestsum_version: 1.7.0
gotestsum_version: 1.12.0
-
name: Run tests
run: gotestsum --format short-verbose ./pkg/...
9 changes: 4 additions & 5 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ jobs:
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: '1.19'
check-latest: true
go-version: '1.23.2'
-
name: Cache Go modules
uses: actions/cache@v3.0.3
uses: actions/cache@v4.2.0
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
Expand All @@ -47,7 +46,7 @@ jobs:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
-
name: Install Cosign
uses: sigstore/cosign-installer@v2.3.0
uses: sigstore/cosign-installer@v3.7.0
-
name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
-
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.23
-
name: Run go list
run: go list -json -m all > go.list
Expand Down
45 changes: 19 additions & 26 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
issues:
exclude-dirs-use-default: true
uniq-by-line: true
exclude-files:
- ".*\\.pb\\.go$"
- ".*\\.gen\\.go$"
- ".*\\_gen\\.go$"
- "mock_.*\\.go"
- ".*\\.resolvers\\.go$"

run:
# default concurrency is a available CPU number
concurrency: 4
Expand All @@ -8,17 +18,6 @@ run:
# include test files or not, default is true
tests: false

skip-files:
- ".*\\.pb\\.go$"
- ".*\\.gen\\.go$"
- ".*\\_gen\\.go$"
- "mock_.*\\.go"
- ".*\\.resolvers\\.go$"

# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true

# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
# If invoked with -mod=readonly, the go command is disallowed from the implicit
# automatic updating of go.mod described above. Instead, it fails when any changes
Expand All @@ -37,17 +36,14 @@ run:
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
# default is "colored-line-number"
format: colored-line-number
formats: colored-line-number

# print lines of code with issue, default is true
print-issued-lines: true

# print linter name in the end of issue text, default is true
print-linter-name: true

# make issues output unique by line, default is true
uniq-by-line: true

# add a prefix to the output file references; default is no prefix
path-prefix: ""

Expand Down Expand Up @@ -142,7 +138,7 @@ linters-settings:
# [deprecated] comma-separated list of pairs of the form pkg:regex
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
ignore: fmt:.*,io/ioutil:^Read.*
exclude-functions: fmt:.*,io/ioutil:^Read.*
exhaustive:
# check switch statements in generated files also
check-generated: false
Expand All @@ -151,8 +147,7 @@ linters-settings:
# switch
default-signifies-exhaustive: false
govet:
# report about shadowed variables
check-shadowing: true
shadow: true
goimports:
local: "github.com/elastic"
golint:
Expand All @@ -161,6 +156,9 @@ linters-settings:
simplify: true
gocyclo:
min-complexity: 15
gosec:
excludes:
- G115 # integer overflow conversion
misspell:
locale: US
lll:
Expand All @@ -170,7 +168,8 @@ linters-settings:
# put imports beginning with prefix after 3rd-party packages;
# only support one prefix
# if not set, use goimports.local-prefixes
local-prefixes: github.com/elastic
sections:
- prefix(github.com/elastic)
gocognit:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 20
Expand All @@ -182,11 +181,6 @@ linters-settings:
nestif:
# minimal complexity of if statements to report, 5 by default
min-complexity: 4
gomnd:
settings:
mnd:
# don't include the "operation" and "assign"
checks: argument,case,condition,return
unused:
# treat code as a program (not a library) and report unused exported identifiers; default is false.
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
Expand Down Expand Up @@ -258,7 +252,7 @@ linters:
# - dupl
- errcheck
- errorlint
- exportloopref
- copyloopvar
- exhaustive
- forbidigo
- funlen
Expand All @@ -269,7 +263,6 @@ linters:
- gofmt
- goheader
- goimports
# - gomnd
- goprintffuncname
- gosec
- gosimple
Expand Down
44 changes: 26 additions & 18 deletions .nancy-ignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
# consul issues - can be ignore because consul is not actively used as a server
CVE-2024-10086
CVE-2022-29153
# etcd issues - can be ignored because etcd is not used.
CVE-2020-15114
CVE-2020-15136
CVE-2020-15115
# end
# golang-jwt/jwt
CVE-2024-51744
# end
# go-jwt issues - can be ignored because not used
CVE-2020-26160
# end
# vault server indirect dependencies - false positive
CVE-2024-2660
CVE-2019-5736
# end
# kubernetes indirect dependencies - false positive
CVE-2020-8558
CVE-2019-11248
CVE-2019-11247
CVE-2018-1002102
CVE-2019-100210
CVE-2019-1002100
CVE-2019-1002101
CVE-2019-11243
CVE-2021-25741
CVE-2019-9946
CVE-2020-8552
CVE-2019-11253
CVE-2020-8559
CVE-2021-25735
CVE-2019-11244
CVE-2019-11246
CVE-2019-11247
CVE-2019-11248
CVE-2019-11249
CVE-2019-11250
CVE-2019-11251
CVE-2019-11253
CVE-2019-11254
CVE-2019-11249
CVE-2019-11246
CVE-2019-100210
CVE-2019-9946
CVE-2020-8552
CVE-2020-8555
CVE-2019-11251
CVE-2019-1002101
CVE-2020-8563
CVE-2020-8557
CVE-2019-11244
CVE-2019-1002100
CVE-2018-1002102
CVE-2020-8558
CVE-2020-8559
CVE-2020-8561
CVE-2020-8563
CVE-2021-25735
CVE-2021-25741
# end
Loading
Loading