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 to go1.23 #386

Merged
merged 4 commits into from
Jan 13, 2025
Merged
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
12 changes: 6 additions & 6 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ $(BINGO): $(BINGO_DIR)/bingo.mod
@echo "(re)installing $(GOBIN)/bingo-v0.9.0"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.9.0 "github.com/bwplotka/bingo"

GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.60.3
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.63.4
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.60.3"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.60.3 "github.com/golangci/golangci-lint/cmd/golangci-lint"
@echo "(re)installing $(GOBIN)/golangci-lint-v1.63.4"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.63.4 "github.com/golangci/golangci-lint/cmd/golangci-lint"

GORELEASER := $(GOBIN)/goreleaser-v1.26.2
$(GORELEASER): $(BINGO_DIR)/goreleaser.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/goreleaser-v1.26.2"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=goreleaser.mod -o=$(GOBIN)/goreleaser-v1.26.2 "github.com/goreleaser/goreleaser"

SETUP_ENVTEST := $(GOBIN)/setup-envtest-v0.0.0-20240820183333-e6c3d139d2b6
SETUP_ENVTEST := $(GOBIN)/setup-envtest-v0.0.0-20250109154033-1de5a3e8bae9
$(SETUP_ENVTEST): $(BINGO_DIR)/setup-envtest.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/setup-envtest-v0.0.0-20240820183333-e6c3d139d2b6"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=setup-envtest.mod -o=$(GOBIN)/setup-envtest-v0.0.0-20240820183333-e6c3d139d2b6 "sigs.k8s.io/controller-runtime/tools/setup-envtest"
@echo "(re)installing $(GOBIN)/setup-envtest-v0.0.0-20250109154033-1de5a3e8bae9"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=setup-envtest.mod -o=$(GOBIN)/setup-envtest-v0.0.0-20250109154033-1de5a3e8bae9 "sigs.k8s.io/controller-runtime/tools/setup-envtest"

2 changes: 1 addition & 1 deletion .bingo/golangci-lint.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ go 1.22.1

toolchain go1.22.5

require github.com/golangci/golangci-lint v1.60.3 // cmd/golangci-lint
require github.com/golangci/golangci-lint v1.63.4 // cmd/golangci-lint
170 changes: 170 additions & 0 deletions .bingo/golangci-lint.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .bingo/setup-envtest.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module _ // Auto generated by /~https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.22.0
go 1.23.0

toolchain go1.22.5
toolchain go1.23.4

require sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20240820183333-e6c3d139d2b6
require sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250109154033-1de5a3e8bae9
4 changes: 4 additions & 0 deletions .bingo/setup-envtest.sum
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
Expand All @@ -77,5 +79,7 @@ sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20240110160329-8f8247f
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20240110160329-8f8247fdc1c3/go.mod h1:TF/lVLWS+JNNaVqJuDDictY2hZSXSsIHCx4FClMvqFg=
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20240820183333-e6c3d139d2b6 h1:Wzx3QswG7gfzqPDw7Ec6/xvJGyoxAKUEoaxWLrk1V/I=
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20240820183333-e6c3d139d2b6/go.mod h1:IaDsO8xSPRxRG1/rm9CP7+jPmj0nMNAuNi/yiHnLX8k=
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250109154033-1de5a3e8bae9 h1:/yKChasubF1bwvq94vBp7Aw2QnLMnVsb8fCXV2/djUw=
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250109154033-1de5a3e8bae9/go.mod h1:Is2SwCWbWAoyGVoVBA627n1SWhWaEwUhaIYSEbtzHT4=
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
4 changes: 2 additions & 2 deletions .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ fi

BINGO="${GOBIN}/bingo-v0.9.0"

GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.60.3"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.63.4"

GORELEASER="${GOBIN}/goreleaser-v1.26.2"

SETUP_ENVTEST="${GOBIN}/setup-envtest-v0.0.0-20240820183333-e6c3d139d2b6"
SETUP_ENVTEST="${GOBIN}/setup-envtest-v0.0.0-20250109154033-1de5a3e8bae9"

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.54.1
version: v1.63.4

go-apidiff:
name: go-apidiff
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/operator-framework/helm-operator-plugins

go 1.22.1
go 1.23.0

toolchain go1.23.4

require (
github.com/go-logr/logr v1.4.2
Expand Down
6 changes: 3 additions & 3 deletions pkg/manager/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ var _ = Describe("NewCachingClientBuilder", func() {
Expect(cl.Create(context.TODO(), cfgMap)).To(Succeed())
})
AfterEach(func() {
Eventually(func() error { return client.IgnoreNotFound(cl.Delete(context.TODO(), pod)) }).Should(BeNil())
Eventually(func() error { return client.IgnoreNotFound(cl.Delete(context.TODO(), cfgMap)) }).Should(BeNil())
Eventually(func() error { return client.IgnoreNotFound(cl.Delete(context.TODO(), ns)) }).Should(BeNil())
Eventually(func() error { return client.IgnoreNotFound(cl.Delete(context.TODO(), pod)) }).Should(Succeed())
Eventually(func() error { return client.IgnoreNotFound(cl.Delete(context.TODO(), cfgMap)) }).Should(Succeed())
Eventually(func() error { return client.IgnoreNotFound(cl.Delete(context.TODO(), ns)) }).Should(Succeed())
})

When("caches are not started", func() {
Expand Down
6 changes: 3 additions & 3 deletions pkg/reconciler/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,12 @@ func SkipPrimaryGVKSchemeRegistration(skip bool) Option {
// concurrent reconciles that the controller will run.
//
// The default is 1.
func WithMaxConcurrentReconciles(max int) Option {
func WithMaxConcurrentReconciles(value int) Option {
return func(r *Reconciler) error {
if max < 1 {
if value < 1 {
return errors.New("maxConcurrentReconciles must be at least 1")
}
r.maxConcurrentReconciles = max
r.maxConcurrentReconciles = value
return nil
}
}
Expand Down
Loading