From 94f8e8164f87e99a7d375c458635a423611ab043 Mon Sep 17 00:00:00 2001 From: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:53:04 -0400 Subject: [PATCH 1/2] Add autoconfigureafter annotation to avoid duplicate metrics --- .../resilience4j/Resilience4JAutoConfiguration.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-cloud-circuitbreaker-resilience4j/src/main/java/org/springframework/cloud/circuitbreaker/resilience4j/Resilience4JAutoConfiguration.java b/spring-cloud-circuitbreaker-resilience4j/src/main/java/org/springframework/cloud/circuitbreaker/resilience4j/Resilience4JAutoConfiguration.java index 14ec122..621d78c 100644 --- a/spring-cloud-circuitbreaker-resilience4j/src/main/java/org/springframework/cloud/circuitbreaker/resilience4j/Resilience4JAutoConfiguration.java +++ b/spring-cloud-circuitbreaker-resilience4j/src/main/java/org/springframework/cloud/circuitbreaker/resilience4j/Resilience4JAutoConfiguration.java @@ -27,6 +27,7 @@ import io.github.resilience4j.micrometer.tagged.TaggedCircuitBreakerMetrics; import io.github.resilience4j.micrometer.tagged.TaggedCircuitBreakerMetricsPublisher; import io.github.resilience4j.micrometer.tagged.TaggedThreadPoolBulkheadMetrics; +import io.github.resilience4j.springboot3.circuitbreaker.autoconfigure.CircuitBreakerMetricsAutoConfiguration; import io.github.resilience4j.timelimiter.TimeLimiterRegistry; import io.micrometer.core.instrument.Meter; import io.micrometer.core.instrument.MeterRegistry; @@ -36,6 +37,7 @@ import jakarta.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; @@ -55,6 +57,7 @@ @EnableConfigurationProperties(Resilience4JConfigurationProperties.class) @ConditionalOnProperty(name = { "spring.cloud.circuitbreaker.resilience4j.enabled", "spring.cloud.circuitbreaker.resilience4j.blocking.enabled" }, matchIfMissing = true) +@AutoConfigureAfter(CircuitBreakerMetricsAutoConfiguration.class) public class Resilience4JAutoConfiguration { @Autowired(required = false) From 854e1f1fa171302e3f789b58e144e399688028ee Mon Sep 17 00:00:00 2001 From: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:57:13 -0400 Subject: [PATCH 2/2] Including the 3.1.x branch in github actions --- .github/workflows/maven.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index 9f768ed..6c07831 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -5,9 +5,9 @@ name: Build on: push: - branches: [ main, 3.0.x, 2.1.x ] + branches: [ main, 3.1.x, 3.0.x, 2.1.x ] pull_request: - branches: [ main, 3.0.x, 2.1.x ] + branches: [ main, 3.1.x, 3.0.x, 2.1.x ] jobs: build: