From 1d88d894c6b272e85e30dc689446cb8aecb1a789 Mon Sep 17 00:00:00 2001 From: Daniel Burrell Date: Wed, 3 Jul 2024 21:27:42 +0100 Subject: [PATCH 1/3] Update pom.xml The groupId com.github.vladimir-bukhtoyarov has migrated to com.bucket4j see https://mvnrepository.com/artifact/com.github.vladimir-bukhtoyarov/bucket4j-core/8.0.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 803a89180a..836959a57f 100644 --- a/pom.xml +++ b/pom.xml @@ -157,7 +157,7 @@ 0.9.6 - com.github.vladimir-bukhtoyarov + com.bucket4j bucket4j-core ${bucket4j.version} From 6a9a69bb2bf26040767ae91053718879716c9c8b Mon Sep 17 00:00:00 2001 From: Daniel Burrell Date: Mon, 8 Jul 2024 18:53:31 +0100 Subject: [PATCH 2/3] amend the extended pom too --- extended/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extended/pom.xml b/extended/pom.xml index 3910f9317d..aba6d704e6 100644 --- a/extended/pom.xml +++ b/extended/pom.xml @@ -39,7 +39,7 @@ commons-lang3 - com.github.vladimir-bukhtoyarov + com.bucket4j bucket4j-core From 13a0e010312a68fca4841a3a6155dd940dd0138c Mon Sep 17 00:00:00 2001 From: Daniel Burrell Date: Fri, 12 Jul 2024 11:51:45 +0100 Subject: [PATCH 3/3] Migrate deprecated Bucket4J class usage to Bucket class to unblock upgrades --- .../client/extended/event/legacy/EventSpamFilter.java | 4 ++-- .../extended/workqueue/ratelimiter/BucketRateLimiter.java | 3 +-- pom.xml | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/extended/src/main/java/io/kubernetes/client/extended/event/legacy/EventSpamFilter.java b/extended/src/main/java/io/kubernetes/client/extended/event/legacy/EventSpamFilter.java index 0bf6f040d6..ca7659850f 100644 --- a/extended/src/main/java/io/kubernetes/client/extended/event/legacy/EventSpamFilter.java +++ b/extended/src/main/java/io/kubernetes/client/extended/event/legacy/EventSpamFilter.java @@ -15,7 +15,7 @@ import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; import io.github.bucket4j.Bandwidth; -import io.github.bucket4j.Bucket4j; +import io.github.bucket4j.Bucket; import io.github.bucket4j.Refill; import io.github.bucket4j.local.LocalBucket; import io.github.bucket4j.local.SynchronizationStrategy; @@ -65,7 +65,7 @@ public boolean filter(CoreV1Event event) { private class SpamRecord { private LocalBucket tokenBucket = - Bucket4j.builder() + Bucket.builder() .addLimit( Bandwidth.classic( capacity, Refill.greedy(refillingTokensPerPeriod, refillingPeriod))) diff --git a/extended/src/main/java/io/kubernetes/client/extended/workqueue/ratelimiter/BucketRateLimiter.java b/extended/src/main/java/io/kubernetes/client/extended/workqueue/ratelimiter/BucketRateLimiter.java index 6155484880..6f0d8bca70 100644 --- a/extended/src/main/java/io/kubernetes/client/extended/workqueue/ratelimiter/BucketRateLimiter.java +++ b/extended/src/main/java/io/kubernetes/client/extended/workqueue/ratelimiter/BucketRateLimiter.java @@ -14,7 +14,6 @@ import io.github.bucket4j.Bandwidth; import io.github.bucket4j.Bucket; -import io.github.bucket4j.Bucket4j; import io.github.bucket4j.Refill; import io.github.bucket4j.local.SynchronizationStrategy; import java.time.Duration; @@ -32,7 +31,7 @@ public BucketRateLimiter(long capacity, long tokensGeneratedInPeriod, Duration p Bandwidth bandwidth = Bandwidth.classic(capacity, Refill.greedy(tokensGeneratedInPeriod, period)); this.bucket = - Bucket4j.builder() + Bucket.builder() .addLimit(bandwidth) .withSynchronizationStrategy(SynchronizationStrategy.SYNCHRONIZED) .build(); diff --git a/pom.xml b/pom.xml index 836959a57f..6237363c8d 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ 2.9.3 4.27.1 5.10.2 - 8.0.1 + 8.10.1 1.78.1 2.11.0 2.17.1