Skip to content

Commit

Permalink
chore: Bump to Go 1.22 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmotso authored and SergK committed May 16, 2024
1 parent 2ce2e4c commit 9c184d6
Show file tree
Hide file tree
Showing 63 changed files with 2,336 additions and 754 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
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
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
run:
timeout: 10m
go: "1.20"
go: "1.22"
issues-exit-code: 1
skip-dirs:
- "mocks"
Expand Down
26 changes: 26 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
with-expecter: True
inpackage: False
dir: "{{.InterfaceDir}}/mocks"
mockname: "Mock{{.InterfaceName}}"
outpkg: "mocks"
filename: "{{.InterfaceName | lower}}_mock.go"
packages:
github.com/epam/edp-codebase-operator/v2/controllers/cdstagedeploy/chain:
interfaces:
CDStageDeployHandler:
github.com/epam/edp-codebase-operator/v2/controllers/codebase/service/chain/handler:
interfaces:
CodebaseHandler:
github.com/epam/edp-codebase-operator/v2/pkg/client/jira:
interfaces:
Client:
github.com/epam/edp-codebase-operator/v2/pkg/gerrit:
interfaces:
Client:
github.com/epam/edp-codebase-operator/v2/pkg/git:
interfaces:
Git:
Command:
github.com/epam/edp-codebase-operator/v2/pkg/gitprovider:
interfaces:
GitProjectProvider:
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,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.13.0)
$(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 @@ -178,6 +178,10 @@ bundle: manifests kustomize ## Generate bundle manifests and metadata, then vali
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle $(BUNDLE_GEN_FLAGS)
operator-sdk bundle validate ./bundle

.PHONY: go-generate
go-generate: ## Run go generate to generate mocks
go generate ./...
mocks: mockery
$(MOCKERY)

MOCKERY = $(LOCALBIN)/mockery
.PHONY: mockery
mockery: ## Download mockery locally if necessary.
$(call go-get-tool,$(MOCKERY),github.com/vektra/mockery/v2,v2.43.0)
36 changes: 23 additions & 13 deletions config/crd/bases/v2.edp.epam.com_cdstagedeployments.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.13.0
controller-gen.kubebuilder.io/version: v0.15.0
name: cdstagedeployments.v2.edp.epam.com
spec:
group: v2.edp.epam.com
Expand All @@ -22,14 +22,19 @@ spec:
description: CDStageDeploy is the Schema for the CDStageDeployments 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 Down Expand Up @@ -103,14 +108,19 @@ spec:
description: CDStageDeploy is the Schema for the CDStageDeployments 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 Down
58 changes: 37 additions & 21 deletions config/crd/bases/v2.edp.epam.com_codebasebranches.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.13.0
controller-gen.kubebuilder.io/version: v0.15.0
name: codebasebranches.v2.edp.epam.com
spec:
group: v2.edp.epam.com
Expand Down Expand Up @@ -39,14 +39,19 @@ spec:
description: CodebaseBranch is the Schema for the CodebaseBranches 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 Down Expand Up @@ -90,8 +95,9 @@ spec:
nullable: true
type: string
detailedMessage:
description: Detailed information regarding action result which were
performed
description: |-
Detailed information regarding action result
which were performed
type: string
failureCount:
description: Amount of times, operator fail to serve with existing
Expand All @@ -109,8 +115,10 @@ spec:
format: date-time
type: string
result:
description: 'A result of an action which were performed. - "success":
action where performed successfully; - "error": error has occurred;'
description: |-
A result of an action which were performed.
- "success": action where performed successfully;
- "error": error has occurred;
enum:
- success
- error
Expand Down Expand Up @@ -150,14 +158,19 @@ spec:
description: CodebaseBranch is the Schema for the CodebaseBranches 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 Down Expand Up @@ -201,8 +214,9 @@ spec:
nullable: true
type: string
detailedMessage:
description: Detailed information regarding action result which were
performed
description: |-
Detailed information regarding action result
which were performed
type: string
failureCount:
description: Amount of times, operator fail to serve with existing
Expand All @@ -217,8 +231,10 @@ spec:
format: date-time
type: string
result:
description: 'A result of an action which were performed. - "success":
action where performed successfully; - "error": error has occurred;'
description: |-
A result of an action which were performed.
- "success": action where performed successfully;
- "error": error has occurred;
enum:
- success
- error
Expand Down
46 changes: 29 additions & 17 deletions config/crd/bases/v2.edp.epam.com_codebaseimagestreams.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.13.0
controller-gen.kubebuilder.io/version: v0.15.0
name: codebaseimagestreams.v2.edp.epam.com
spec:
group: v2.edp.epam.com
Expand All @@ -28,14 +28,19 @@ 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
Expand Down Expand Up @@ -71,8 +76,9 @@ spec:
description: CodebaseImageStreamStatus defines the observed state of CodebaseImageStream.
properties:
detailed_message:
description: Detailed information regarding action result which were
performed
description: |-
Detailed information regarding action result
which were performed
type: string
failureCount:
description: Amount of times, operator fail to serve with existing
Expand All @@ -95,14 +101,19 @@ 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
Expand Down Expand Up @@ -138,8 +149,9 @@ spec:
description: CodebaseImageStreamStatus defines the observed state of CodebaseImageStream.
properties:
detailed_message:
description: Detailed information regarding action result which were
performed
description: |-
Detailed information regarding action result
which were performed
type: string
failureCount:
description: Amount of times, operator fail to serve with existing
Expand Down

0 comments on commit 9c184d6

Please sign in to comment.