spring-cloud-consul icon indicating copy to clipboard operation
spring-cloud-consul copied to clipboard

EnableRetry is enabled un-conditionally

Open wind57 opened this issue 3 years ago • 3 comments

We have this report of a bug in spring cloud kubernetes here. The underlying issue is that if spring consul is on the classpath, it automatically enable spring-retry, as seen in this configuration.

That class has @ConditionalOnProperty(value = "spring.cloud.consul.retry.enabled", matchIfMissing = true), but the problem is in matchIfMissing = true.

To give some details: for example someone has both consul and kubernetes dependencies on the classpath. Because consul enables spring retry un-conditonally, it means it is enabled in kubernetes also - though users might not want that. The linked issue has all the needed details. To me, matchIfMissing = true should be dropped.

wdyt?

wind57 avatar Jan 29 '22 21:01 wind57

Unfortunately, this didn't make it into a major release for breaking changes.

spencergibb avatar Mar 08 '23 22:03 spencergibb

After discussion, we will remove @EnableRetry to be consistent with the rest of the portfolio. Because it is a breaking change, we're going to wait until 2023.0.0 due later in the year.

spencergibb avatar Mar 09 '23 18:03 spencergibb

Makes sense. Thank you.

wind57 avatar Mar 09 '23 18:03 wind57