Skip to content

Commit

Permalink
chore: Bump to Go 1.22 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmotso committed May 16, 2024
1 parent 89e3c43 commit 80a19a1
Show file tree
Hide file tree
Showing 21 changed files with 300 additions and 204 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ master ]

env:
GOLANG_VERSION: '1.20'
GOLANG_VERSION: '1.22'

jobs:

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches: [ master ]

env:
GOLANG_VERSION: '1.22'

jobs:
analyze:
name: Analyze
Expand All @@ -18,6 +21,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

env:
GOLANG_VERSION: '1.20'
GOLANG_VERSION: '1.22'

jobs:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- 'v*'

env:
GOLANG_VERSION: '1.20'
GOLANG_VERSION: '1.22'

jobs:
prepare-release:
Expand Down
3 changes: 1 addition & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
run:
timeout: 5m
go: "1.20"
go: "1.22"
issues-exit-code: 1
build-tags:
- mytag
Expand Down Expand Up @@ -197,7 +197,6 @@ linters-settings:
# By default list of stable checks is used.
enabled-checks:
- nestingReduce
- unnamedresult
- ruleguard
- truncateCmp

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ crdoc: ## Download crdoc locally if necessary.
CONTROLLER_GEN = ${LOCALBIN}/controller-gen
.PHONY: controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen,v0.12.1)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen,v0.15.0)
# go-get-tool will 'go get' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
define go-get-tool
Expand All @@ -168,7 +168,7 @@ endef
GOLANGCILINT = ${LOCALBIN}/golangci-lint
.PHONY: golangci-lint
golangci-lint: ## Download golangci-lint locally if necessary.
$(call go-get-tool,$(GOLANGCILINT),github.com/golangci/golangci-lint/cmd/golangci-lint,v1.53.3)
$(call go-get-tool,$(GOLANGCILINT),github.com/golangci/golangci-lint/cmd/golangci-lint,v1.58.1)

.PHONY: install
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/zz_generated.deepcopy.go

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

26 changes: 16 additions & 10 deletions config/crd/bases/edp.epam.com_sonargroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.15.0
name: sonargroups.edp.epam.com
spec:
group: edp.epam.com
Expand All @@ -20,14 +20,19 @@ spec:
description: SonarGroup is the Schema for the sonar group API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand All @@ -40,9 +45,10 @@ spec:
maxLength: 200
type: string
name:
description: Name is a group name. Name should be unique across all
groups. Do not edit this field after creation. Otherwise, the group
will be recreated.
description: |-
Name is a group name.
Name should be unique across all groups.
Do not edit this field after creation. Otherwise, the group will be recreated.
example: sonar-users
maxLength: 255
type: string
Expand Down
36 changes: 21 additions & 15 deletions config/crd/bases/edp.epam.com_sonarpermissiontemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.15.0
name: sonarpermissiontemplates.edp.epam.com
spec:
group: edp.epam.com
Expand All @@ -21,14 +21,19 @@ spec:
template API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand All @@ -37,11 +42,11 @@ spec:
SonarPermissionTemplate.
properties:
default:
description: Default is a flag to set permission template as default.
Only one permission template can be default. If several permission
templates have default flag, the random one will be chosen. Default
permission template can't be deleted. You need to set another permission
template as default before.
description: |-
Default is a flag to set permission template as default.
Only one permission template can be default.
If several permission templates have default flag, the random one will be chosen.
Default permission template can't be deleted. You need to set another permission template as default before.
example: "true"
type: boolean
description:
Expand All @@ -62,9 +67,10 @@ spec:
nullable: true
type: object
name:
description: Name is a name of permission template. Name should be
unique across all permission templates. Do not edit this field after
creation. Otherwise, the permission template will be recreated.
description: |-
Name is a name of permission template.
Name should be unique across all permission templates.
Do not edit this field after creation. Otherwise, the permission template will be recreated.
example: sonar-users-tmpl
maxLength: 100
type: string
Expand Down
44 changes: 27 additions & 17 deletions config/crd/bases/edp.epam.com_sonarqualitygates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.15.0
name: sonarqualitygates.edp.epam.com
spec:
group: edp.epam.com
Expand All @@ -20,14 +20,19 @@ spec:
description: SonarQualityGate is the Schema for the sonarqualitygates API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand All @@ -44,16 +49,19 @@ spec:
maxLength: 64
type: string
op:
description: Op is condition operator. LT = is lower than GT
= is greater than
description: |-
Op is condition operator.
LT = is lower than
GT = is greater than
enum:
- LT
- GT
type: string
required:
- error
type: object
description: Conditions is a list of conditions for quality gate.
description: |-
Conditions is a list of conditions for quality gate.
Key is a metric name, value is a condition.
example:
new_code_smells:
Expand All @@ -62,16 +70,18 @@ spec:
nullable: true
type: object
default:
description: Default is a flag to set quality gate as default. Only
one quality gate can be default. If several quality gates have default
flag, the random one will be chosen. Default quality gate can't
be deleted. You need to set another quality gate as default before.
description: |-
Default is a flag to set quality gate as default.
Only one quality gate can be default.
If several quality gates have default flag, the random one will be chosen.
Default quality gate can't be deleted. You need to set another quality gate as default before.
example: "true"
type: boolean
name:
description: Name is a name of quality gate. Name should be unique
across all quality gates. Don't change this field after creation
otherwise quality gate will be recreated.
description: |-
Name is a name of quality gate.
Name should be unique across all quality gates.
Don't change this field after creation otherwise quality gate will be recreated.
example: My Quality Gate
maxLength: 100
type: string
Expand Down
41 changes: 24 additions & 17 deletions config/crd/bases/edp.epam.com_sonarqualityprofiles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
controller-gen.kubebuilder.io/version: v0.15.0
name: sonarqualityprofiles.edp.epam.com
spec:
group: edp.epam.com
Expand All @@ -21,36 +21,42 @@ spec:
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: SonarQualityProfileSpec defines the desired state of SonarQualityProfile
properties:
default:
description: Default is a flag to set quality profile as default.
Only one quality profile can be default. If several quality profiles
have default flag, the random one will be chosen. Default quality
profile can't be deleted. You need to set another quality profile
as default before.
description: |-
Default is a flag to set quality profile as default.
Only one quality profile can be default.
If several quality profiles have default flag, the random one will be chosen.
Default quality profile can't be deleted. You need to set another quality profile as default before.
example: "true"
type: boolean
language:
description: Language is a language of quality profile.
example: go
type: string
name:
description: Name is a name of quality profile. Name should be unique
across all quality profiles. Don't change this field after creation
otherwise quality profile will be recreated.
description: |-
Name is a name of quality profile.
Name should be unique across all quality profiles.
Don't change this field after creation otherwise quality profile will be recreated.
example: My Quality Profile
maxLength: 100
type: string
Expand All @@ -73,8 +79,9 @@ spec:
example: MAJOR
type: string
type: object
description: Rules is a list of rules for quality profile. Key is
a rule key, value is a rule.
description: |-
Rules is a list of rules for quality profile.
Key is a rule key, value is a rule.
example:
S5547:
params: key1=v1;key2=v2
Expand Down
Loading

0 comments on commit 80a19a1

Please sign in to comment.