spring-cloud / spring-cloud-consul

Spring Cloud Consul
http://cloud.spring.io/spring-cloud-consul/
Apache License 2.0
808 stars 540 forks source link

EnableRetry is enabled un-conditionally #766

Open wind57 opened 2 years ago

wind57 commented 2 years ago

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?

spencergibb commented 1 year ago

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

spencergibb commented 1 year ago

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.

wind57 commented 1 year ago

Makes sense. Thank you.