Skip to content

Commit

Permalink
chore: bump Golang to 1.18.6 (kedacore#3653)
Browse files Browse the repository at this point in the history
  • Loading branch information
JorTurFer authored Sep 9, 2022
1 parent df36d7a commit ef84e3e
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 192 deletions.
8 changes: 4 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

FROM golang:1.17.13
FROM golang:1.18.6

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -50,8 +50,8 @@ RUN apt-get update \
golang.org/x/tools/cmd/goimports \
golang.org/x/lint/golint \
github.com/alecthomas/gometalinter 2>&1 \
# github.com/mgechev/revive \ # This pkg deps use generics, we cannot use it till we use go 1.18
# github.com/derekparker/delve/cmd/dlv 2>&1 \ # This pkg deps use generics, we cannot use it till we use go 1.18
github.com/mgechev/revive \
github.com/derekparker/delve/cmd/dlv 2>&1 \
&& go install honnef.co/go/tools/cmd/staticcheck@latest \
&& go install golang.org/x/tools/gopls@latest \
# Protocol Buffer Compiler
Expand All @@ -61,7 +61,7 @@ RUN apt-get update \
&& mv $HOME/.local/bin/protoc /usr/local/bin/protoc \
&& mv $HOME/.local/include/ /usr/local/bin/include/ \
# Install golangci-lint
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.2 \
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0 \
#
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
&& groupadd --gid $USER_GID $USERNAME \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
- run: go version
- uses: fossas/fossa-action@main
name: Scanning with FOSSA
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**

# build-tools is built from ../../tools/build-tools.Dockerfile
container: ghcr.io/kedacore/build-tools:1.17.13
container: ghcr.io/kedacore/build-tools:1.18.6
steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}

- name: Go modules sync
run: go mod tidy -compat=1.17
run: go mod tidy -compat=1.18

- name: Test
run: make test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
needs: triage
runs-on: ubuntu-latest
name: Build images
container: ghcr.io/kedacore/build-tools:1.17.13
container: ghcr.io/kedacore/build-tools:1.18.6
if: needs.triage.outputs.run-e2e == 'true'
steps:
- name: Set status in-progress
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
needs: [triage, build-test-images]
runs-on: e2e
name: Execute e2e tests
container: ghcr.io/kedacore/build-tools:1.17.13
container: ghcr.io/kedacore/build-tools:1.18.6
if: needs.triage.outputs.run-e2e == 'true'
steps:
- name: Set status in-progress
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
validate:
name: validate - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/build-tools:1.17.13
container: ghcr.io/kedacore/build-tools:1.18.6
strategy:
matrix:
include:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}

- name: Go modules sync
run: go mod tidy -compat=1.17
run: go mod tidy -compat=1.18

- name: Verify Generated clientset is up to date
run: make clientset-verify
Expand All @@ -65,7 +65,7 @@ jobs:
validate-dockerfiles:
name: validate-dockerfiles - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/build-tools:1.17.13
container: ghcr.io/kedacore/build-tools:1.18.6
strategy:
matrix:
include:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
validate-build-tools:
name: Validate build-tools - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/build-tools:1.17.13
container: ghcr.io/kedacore/build-tools:1.18.6
strategy:
matrix:
include:
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
validate-dev-container:
name: Validate dev-container - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/build-tools:1.17.13
container: ghcr.io/kedacore/build-tools:1.18.6
strategy:
matrix:
include:
Expand Down Expand Up @@ -168,9 +168,9 @@ jobs:
python-version: 3.x
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
- name: Get golangci
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.2
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
- uses: pre-commit/action@v3.0.0

codeScanning:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**

# build-tools is built from ../../tools/build-tools.Dockerfile
container: ghcr.io/kedacore/build-tools:1.17.13
container: ghcr.io/kedacore/build-tools:1.18.6
steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}

- name: Go modules sync
run: go mod tidy -compat=1.17
run: go mod tidy -compat=1.18

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/template-main-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Run e2e test
runs-on: ubuntu-latest
# build-tools is built from ../../tools/build-tools.Dockerfile
container: ghcr.io/kedacore/build-tools:1.17.13
container: ghcr.io/kedacore/build-tools:1.18.6
concurrency: e2e-tests
steps:
- name: Check out code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/template-smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18

- name: Install prerequisites
run: |
Expand Down
7 changes: 2 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ linters:
- goprintffuncname
- govet
- nolintlint
- rowserrcheck
#- rowserrcheck
- gofmt
- revive
- goimports
Expand All @@ -27,8 +27,6 @@ linters:
- ineffassign
- staticcheck
- exportloopref
- structcheck
- deadcode
- depguard
- dogsled
- errcheck
Expand All @@ -40,7 +38,6 @@ linters:
- gosimple
- stylecheck
- unused
- varcheck
- unparam
- unconvert
- whitespace
Expand Down Expand Up @@ -80,7 +77,7 @@ issues:
# We need to use Golang 1.18 before update the SDK due to it's a prerrequisite
- linters:
- staticcheck
text: "SA1019: package github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights"
text: "SA1019: \"github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights"
# Exclude for stan_scaler and nats_jetstream_scaler, reason:
# pkg/scalers/nats_jetstream_scaler.go:109: 109-153 lines are duplicate of `pkg/scalers/stan_scaler.go:83-127` (dupl)
- path: nats_jetstream_scaler.go
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To learn more about active deprecations, we recommend checking [GitHub Discussio

### Other

- TODO ([#XXX](https://github.com/kedacore/keda/issue/XXX))
- **General**: Bump Golang to 1.18.6 ([#3205](https://github.com/kedacore/keda/issues/3205))

## v2.8.1

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM --platform=$BUILDPLATFORM golang:1.17.13 AS builder
FROM --platform=$BUILDPLATFORM golang:1.18.6 AS builder

ARG BUILD_VERSION=main
ARG GIT_COMMIT=HEAD
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.adapter
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the adapter binary
FROM --platform=$BUILDPLATFORM golang:1.17.13 as builder
FROM --platform=$BUILDPLATFORM golang:1.18.6 as builder

ARG BUILD_VERSION=main
ARG GIT_COMMIT=HEAD
Expand Down
1 change: 0 additions & 1 deletion controllers/keda/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"

kedav1alpha1 "github.com/kedacore/keda/v2/apis/keda/v1alpha1"
//nolint:gci
// +kubebuilder:scaffold:imports
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kedacore/keda/v2

go 1.17
go 1.18

require (
cloud.google.com/go/compute v1.9.0
Expand Down
Loading

0 comments on commit ef84e3e

Please sign in to comment.