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

bump Go version to 1.22 #1088

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down Expand Up @@ -55,11 +55,11 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22
- uses: actions/checkout@v2
- name: Package charts
run: make helm-generate
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: charts
path: charts/*.tgz
6 changes: 3 additions & 3 deletions .github/workflows/chart-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22

- uses: azure/setup-kubectl@v3
with:
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
kubectl logs -l "release=harbor-redis" --all-containers > /tmp/harbor/redis.log
ls -l /tmp/harbor

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: harbor_chart
Expand All @@ -189,7 +189,7 @@ jobs:
kind export logs --name harbor /tmp/logs
ls -l /tmp/logs

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: kind_chart
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/contour-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22

- uses: azure/setup-kubectl@v3
with:
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
kubectl -n cluster-sample-ns logs -l "app.kubernetes.io/component=redis" --all-containers > /tmp/harbor/redis.log
ls -l /tmp/harbor

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: contour_harbor_v${{ matrix.k8sVersion }}_v${{ matrix.certManager }}_${{ matrix.samples }}
Expand All @@ -211,7 +211,7 @@ jobs:
kind export logs --name harbor /tmp/logs
ls -l /tmp/logs

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: contour_kind_v${{ matrix.k8sVersion }}_v${{ matrix.certManager }}_${{ matrix.samples }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/harbor-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22

- uses: azure/setup-kubectl@v3
with:
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
kubectl -n cluster-sample-ns logs -l "app.kubernetes.io/component=redis" --all-containers > /tmp/harbor/redis.log
ls -l /tmp/harbor

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: harbor_v${{ matrix.k8sVersion }}_v${{ matrix.certManager }}_${{ matrix.samples }}
Expand All @@ -214,7 +214,7 @@ jobs:
kind export logs --name harbor /tmp/logs
ls -l /tmp/logs

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: kind_v${{ matrix.k8sVersion }}_v${{ matrix.certManager }}_${{ matrix.samples }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
run: git fetch --prune --unshallow
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22
- name: prepare changelog
run: |
tag=${{ github.ref }}
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22
- uses: actions/checkout@v2
- run: |
docker buildx create --use
Expand All @@ -39,7 +39,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22
- uses: actions/checkout@v2
- run: make go-lint

Expand All @@ -49,7 +49,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22
- uses: actions/checkout@v2
- run: make go-dependencies-test

Expand All @@ -59,7 +59,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22
- uses: actions/checkout@v2
- run: make generated-diff-test

Expand All @@ -75,7 +75,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22

- name: Cache go mod
uses: actions/cache@v2
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
kind export logs --name harbor /tmp/logs
ls -l /tmp/logs

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: kind_go-tests
Expand All @@ -129,7 +129,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22
- uses: actions/checkout@v2
- run: make manifests
- uses: azure/k8s-bake@v1
Expand All @@ -144,7 +144,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.22
- uses: actions/checkout@v2
- run: make manifests
- uses: azure/k8s-bake@v1
Expand Down
48 changes: 21 additions & 27 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,66 @@
run:
deadline: 10m
modules-download-mode: readonly
skip-files:
issue:
exclude-files:
- pkged.go
- ".*/zz_generated.*\\.go"
skip-dirs:
exclude-dirs:
- bin
- dist

linters:
enable:
- asciicheck
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- errorlint
- exhaustive
- exportloopref
- funlen
- gci
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- goerr113
- gofmt
- gofumpt
- goheader
- goimports
- revive
- gomnd
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
# - interfacer
# - maligned
- misspell
- nakedret
- nestif
- nlreturn
- noctx
- nolintlint
- prealloc
- rowserrcheck
- exportloopref
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- testpackage
- tparallel
- typecheck
- unconvert
- unparam
- unused
- varcheck
disable:
- gocognit
- err113
- nestif
- gocritic
- funlen
- godot
- gci
- whitespace
- unparam
- nlreturn
- gofumpt
- wsl
disable:
- exhaustivestruct
- govet
- gosec
- nakedret
- nolintlint
- revive
- depguard
- staticcheck
- lll
- gochecknoglobals
- godox
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18.3 as build
FROM golang:1.22.6 as build
WORKDIR /workspace
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$(go env GOARCH) go build -o manager main.go
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ helm-postgres-operator: helm $(CHARTS_DIRECTORY)/postgres-operator/values.yaml
$(MAKE) kube-namespace
$(HELM) repo add zalando https://opensource.zalando.com/postgres-operator/charts/postgres-operator
$(HELM) repo update
$(HELM) upgrade --namespace "$(NAMESPACE)" --install postgres-operator zalando/postgres-operator --version 1.7.0 -f $(CHARTS_DIRECTORY)/postgres-operator/values.yaml
$(HELM) upgrade --namespace "$(NAMESPACE)" --install postgres-operator zalando/postgres-operator --version 1.9.0 -f $(CHARTS_DIRECTORY)/postgres-operator/values.yaml

helm-install: helm helm-generate helm-minio-operator helm-redis-operator helm-postgres-operator
$(MAKE) kube-namespace
Expand Down Expand Up @@ -530,7 +530,7 @@ clean:

# find or download controller-gen
# download controller-gen if necessary
CONTROLLER_GEN_VERSION := 0.9.2
CONTROLLER_GEN_VERSION := 0.16.2
CONTROLLER_GEN := $(BIN)/controller-gen

.PHONY: controller-gen
Expand Down Expand Up @@ -573,7 +573,7 @@ $(MARKDOWNLINT):
# find or download golangci-lint
# download golangci-lint if necessary
GOLANGCI_LINT := $(BIN)/golangci-lint
GOLANGCI_LINT_VERSION := 1.49.0
GOLANGCI_LINT_VERSION := 1.60.3

.PHONY: golangci-lint
golangci-lint:
Expand Down Expand Up @@ -661,7 +661,7 @@ $(GORELEASER):

# find or download stringer
# download stringer if necessary
STRINGER_VERSION := v0.11.0
STRINGER_VERSION := v0.25.0
STRINGER := $(BIN)/stringer

.PHONY: stringer
Expand Down
10 changes: 6 additions & 4 deletions apis/goharbor.io/v1alpha3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading