Skip to content

Commit a71548d

Browse files
committed
fix(deps): update all major dependencies (major) (#161)
1 parent 1bc0d15 commit a71548d

File tree

19 files changed

+63
-43
lines changed

19 files changed

+63
-43
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313
jobs:
1414
check-integrity:
1515
name: Check integrity
16-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-24.04
1717

1818
steps:
1919
- name: Checkout code
@@ -49,7 +49,7 @@ jobs:
4949
5050
build:
5151
name: Build
52-
runs-on: ubuntu-22.04
52+
runs-on: ubuntu-24.04
5353

5454
steps:
5555
- name: Checkout code

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ concurrency:
2727
jobs:
2828
analyze:
2929
name: Analyze
30-
runs-on: ubuntu-22.04
30+
runs-on: ubuntu-24.04
3131
permissions:
3232
actions: read
3333
contents: read

.github/workflows/e2e-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515

1616
jobs:
1717
build:
18-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-24.04
1919

2020
steps:
2121
- name: Checkout code

controllers/tests/cruisecontroloperation_controller_test.go

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ import (
3737
"github.com/banzaicloud/koperator/pkg/scale"
3838
)
3939

40+
const (
41+
// Additional test timeout constants for operation controller tests
42+
operationRetryTimeoutDuration = time.Duration(v1alpha1.DefaultRetryBackOffDurationSec+10) * time.Second // timeout for retry operations
43+
operationExtendedTimeoutDuration = 15 * time.Second // extended timeout for complex operations
44+
)
45+
4046
var _ = Describe("CruiseControlTaskReconciler", func() {
4147
var (
4248
count uint64 = 0
@@ -114,7 +120,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
114120
return ""
115121
}
116122
return operation.CurrentTaskState()
117-
}, 10*time.Second, 500*time.Millisecond).Should(Equal(v1beta1.CruiseControlTaskCompleted))
123+
}, maxReconcileDuration, reconcilePollingPeriod).Should(Equal(v1beta1.CruiseControlTaskCompleted))
118124
})
119125
})
120126
When("add_broker operation is finished with completedWithError and 30s has not elapsed", Serial, func() {
@@ -141,13 +147,15 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
141147
return false
142148
}
143149
return operation.CurrentTaskState() == v1beta1.CruiseControlTaskCompletedWithError && len(operation.Status.FailedTasks) == 0
144-
}, 10*time.Second, 500*time.Millisecond).Should(BeTrue())
150+
}, maxReconcileDuration, reconcilePollingPeriod).Should(BeTrue())
145151
})
146152
})
147153
When("add_broker operation is finished with completedWithError and 30s has elapsed", Serial, func() {
148154
JustBeforeEach(func(ctx SpecContext) {
149155
cruiseControlOperationReconciler.ScaleFactory = mocks.NewMockScaleFactory(getScaleMock5())
150156
operation := generateCruiseControlOperation(opName1, namespace, kafkaCluster.GetName())
157+
// Explicitly set error policy to retry to ensure retry behavior
158+
operation.Spec.ErrorPolicy = v1alpha1.ErrorPolicyRetry
151159
err := k8sClient.Create(ctx, &operation)
152160
Expect(err).NotTo(HaveOccurred())
153161
operation.Status.CurrentTask = &v1alpha1.CruiseControlTask{
@@ -167,10 +175,17 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
167175
Name: opName1,
168176
}, &operation)
169177
if err != nil {
178+
fmt.Printf("Error getting operation: %v\n", err)
170179
return false
171180
}
181+
182+
// Debug logging
183+
fmt.Printf("Operation state: %s, FailedTasks: %d, IsWaitingForRetryExecution: %v, IsReadyForRetryExecution: %v\n",
184+
operation.CurrentTaskState(), len(operation.Status.FailedTasks),
185+
operation.IsWaitingForRetryExecution(), operation.IsReadyForRetryExecution())
186+
172187
return operation.CurrentTaskState() == v1beta1.CruiseControlTaskCompleted && len(operation.Status.FailedTasks) == 1
173-
}, 10*time.Second, 500*time.Millisecond).Should(BeTrue())
188+
}, operationRetryTimeoutDuration, reconcilePollingPeriod).Should(BeTrue())
174189
})
175190
})
176191
When("there is an errored remove_broker and an add_broker operation", Serial, func() {
@@ -217,7 +232,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
217232
}
218233

219234
return operation2.CurrentTaskState() == v1beta1.CruiseControlTaskCompleted
220-
}, 10*time.Second, 500*time.Millisecond).Should(BeTrue())
235+
}, maxReconcileDuration, reconcilePollingPeriod).Should(BeTrue())
221236
})
222237
})
223238
When("there is a new remove_broker and an errored remove_broker operation with pause annotation", Serial, func() {
@@ -266,7 +281,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
266281
}
267282

268283
return operation1.Status.RetryCount == 0 && operation2.CurrentTaskState() == v1beta1.CruiseControlTaskCompleted
269-
}, 10*time.Second, 500*time.Millisecond).Should(BeTrue())
284+
}, maxReconcileDuration, reconcilePollingPeriod).Should(BeTrue())
270285
})
271286
})
272287
When("there is a new remove_broker and an errored remove_broker operation with ignore ErrorPolicy", Serial, func() {
@@ -316,7 +331,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
316331
}
317332

318333
return operation1.Status.RetryCount == 0 && operation2.CurrentTaskState() == v1beta1.CruiseControlTaskCompleted
319-
}, 10*time.Second, 500*time.Millisecond).Should(BeTrue())
334+
}, maxReconcileDuration, reconcilePollingPeriod).Should(BeTrue())
320335
})
321336
})
322337
When("there is an errored remove_disks and a rebalance disks operation for the same broker", Serial, func() {
@@ -370,7 +385,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
370385

371386
return rebalanceOp.CurrentTaskState() == v1beta1.CruiseControlTaskCompleted &&
372387
removeDisksOp.GetLabels()[v1alpha1.PauseLabel] == v1alpha1.True
373-
}, 10*time.Second, 500*time.Millisecond).Should(BeTrue())
388+
}, maxReconcileDuration, reconcilePollingPeriod).Should(BeTrue())
374389
})
375390
})
376391
When("Cruise Control makes the Status operation async", Serial, func() {
@@ -398,7 +413,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
398413
return ""
399414
}
400415
return operation.CurrentTaskState()
401-
}, 15*time.Second, 500*time.Millisecond).Should(Equal(v1beta1.CruiseControlTaskCompleted))
416+
}, operationExtendedTimeoutDuration, reconcilePollingPeriod).Should(Equal(v1beta1.CruiseControlTaskCompleted))
402417
})
403418
})
404419
})

controllers/tests/cruisecontroltask_controller_test.go

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ import (
3737
"github.com/banzaicloud/koperator/pkg/util"
3838
)
3939

40+
const (
41+
// Additional test timeout constants for task controller tests
42+
taskRetryTimeoutDuration = time.Duration(v1alpha1.DefaultRetryBackOffDurationSec+10) * time.Second // timeout for retry operations
43+
taskExtendedTimeoutDuration = 15 * time.Second // extended timeout for complex operations
44+
)
45+
4046
var _ = Describe("CruiseControlTaskReconciler", func() {
4147
var (
4248
count uint64 = 0
@@ -142,7 +148,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
142148
volumeState.CruiseControlVolumeState == v1beta1.GracefulDiskRebalanceScheduled &&
143149
operation.CurrentTask() != nil && operation.CurrentTask().Parameters["rebalance_disk"] == trueStr
144150

145-
}, 15*time.Second, 500*time.Millisecond).Should(BeTrue())
151+
}, taskExtendedTimeoutDuration, reconcilePollingPeriod).Should(BeTrue())
146152
})
147153
})
148154
When("new storage is added but there is a not JBOD capacityConfig for that", Serial, func() {
@@ -222,7 +228,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
222228
volumeState.CruiseControlVolumeState == v1beta1.GracefulDiskRebalanceScheduled &&
223229
operation.CurrentTask() != nil && operation.CurrentTask().Parameters["rebalance_disk"] != trueStr
224230

225-
}, 15*time.Second, 500*time.Millisecond).Should(BeTrue())
231+
}, taskExtendedTimeoutDuration, reconcilePollingPeriod).Should(BeTrue())
226232
})
227233
})
228234
When("new storage is added and one broker is JBOD and another is not JBOD", Serial, func() {
@@ -307,7 +313,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
307313
operation.CurrentTaskOperation() == v1alpha1.OperationRebalance &&
308314
volumeState.CruiseControlVolumeState == v1beta1.GracefulDiskRebalanceScheduled &&
309315
operation.CurrentTask() != nil && operation.CurrentTask().Parameters["rebalance_disk"] != trueStr
310-
}, 15*time.Second, 500*time.Millisecond).Should(BeTrue())
316+
}, taskExtendedTimeoutDuration, reconcilePollingPeriod).Should(BeTrue())
311317
})
312318
})
313319
When("new broker is added", Serial, func() {
@@ -350,7 +356,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
350356

351357
}
352358
return false
353-
}, 10*time.Second, 500*time.Millisecond).Should(BeTrue())
359+
}, maxReconcileDuration, reconcilePollingPeriod).Should(BeTrue())
354360
})
355361
When("created CruiseControlOperation state is inExecution", Serial, func() {
356362
It("kafkaCluster gracefulActionState should be GracefulUpscaleRunning", func(ctx SpecContext) {
@@ -393,7 +399,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
393399
operation.CurrentTaskOperation() == v1alpha1.OperationAddBroker && actionState.CruiseControlState == v1beta1.GracefulUpscaleRunning
394400
}
395401
return false
396-
}, 10*time.Second, 500*time.Millisecond).Should(BeTrue())
402+
}, maxReconcileDuration, reconcilePollingPeriod).Should(BeTrue())
397403
})
398404
})
399405

@@ -442,7 +448,7 @@ var _ = Describe("CruiseControlTaskReconciler", func() {
442448
return actionState.CruiseControlOperationReference.Name == operation.Name && operation.CurrentTaskOperation() == v1alpha1.OperationRemoveBroker && actionState.CruiseControlState == v1beta1.GracefulDownscaleScheduled
443449
}
444450
return false
445-
}, 15*time.Second, 500*time.Millisecond).Should(BeTrue())
451+
}, taskExtendedTimeoutDuration, reconcilePollingPeriod).Should(BeTrue())
446452
})
447453
})
448454
})

docs/examples/springboot-kafka-avro/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.7.18</version>
8+
<version>3.5.6</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>io.banzaicloud.blog</groupId>
@@ -46,7 +46,7 @@
4646
<dependency>
4747
<groupId>io.confluent</groupId>
4848
<artifactId>kafka-schema-registry-client</artifactId> <!-- <1> -->
49-
<version>5.5.15</version>
49+
<version>8.0.0</version>
5050
</dependency>
5151
<dependency>
5252
<groupId>org.apache.avro</groupId>
@@ -56,7 +56,7 @@
5656
<dependency>
5757
<groupId>io.confluent</groupId>
5858
<artifactId>kafka-avro-serializer</artifactId> <!-- <3> -->
59-
<version>5.5.15</version>
59+
<version>8.0.0</version>
6060
</dependency>
6161
</dependencies>
6262

go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ require (
1717
github.com/cisco-open/cluster-registry-controller/api v0.2.12
1818
github.com/envoyproxy/go-control-plane v0.13.4
1919
github.com/envoyproxy/go-control-plane/envoy v1.32.5-0.20250926155504-ac643a5856f9
20-
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344
2120
github.com/go-logr/logr v1.4.3
2221
github.com/onsi/ginkgo/v2 v2.25.3
2322
github.com/onsi/gomega v1.38.2
@@ -40,6 +39,7 @@ require (
4039

4140
require (
4241
cel.dev/expr v0.24.0 // indirect
42+
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
4343
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
4444
github.com/go-openapi/swag/cmdutils v0.24.0 // indirect
4545
github.com/go-openapi/swag/conv v0.24.0 // indirect
@@ -87,7 +87,6 @@ require (
8787
github.com/eapache/queue v1.1.0 // indirect
8888
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
8989
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
90-
github.com/evanphx/json-patch v5.9.11+incompatible // indirect
9190
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
9291
github.com/fatih/color v1.18.0 // indirect
9392
github.com/fsnotify/fsnotify v1.9.0 // indirect
@@ -150,7 +149,7 @@ require (
150149
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect
151150
sigs.k8s.io/gateway-api v1.3.0 // indirect
152151
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
153-
sigs.k8s.io/yaml v1.6.0 // indirect
152+
sigs.k8s.io/yaml v1.6.0
154153
)
155154

156155
replace (

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S
6060
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
6161
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
6262
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
63-
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344 h1:Arcl6UOIS/kgO2nW3A65HN+7CMjSDP/gofXL4CZt1V4=
64-
github.com/ghodss/yaml v1.0.1-0.20220118164431-d8423dcdf344/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I=
6563
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
6664
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
6765
github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=

pkg/resources/envoy/configmap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ import (
3737
envoytypesmatcher "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3"
3838
envoytypes "github.com/envoyproxy/go-control-plane/envoy/type/v3"
3939
"github.com/envoyproxy/go-control-plane/pkg/wellknown"
40-
"github.com/ghodss/yaml"
4140
"github.com/go-logr/logr"
41+
"sigs.k8s.io/yaml"
4242

4343
"google.golang.org/protobuf/encoding/protojson"
4444
"google.golang.org/protobuf/types/known/anypb"

pkg/resources/kafka/pvc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"fmt"
2020
"text/template"
2121

22-
"github.com/ghodss/yaml"
22+
"sigs.k8s.io/yaml"
2323

2424
"emperror.dev/errors"
2525
corev1 "k8s.io/api/core/v1"

0 commit comments

Comments
 (0)