spring-cloud / spring-cloud/spring-cloud-consul
EnableRetry is enabled un-conditionally
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 822
- Forks
- 539
- Avg merge
- 9h 31m
- Merged PRs (30d)
- 7
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in spring-cloud-consul-core/src/main/java/org/springframework/cloud/consul/ConsulAutoConfiguration.java at the linked ConsulAutoConfiguration configuration and inspect its spring.cloud.consul.retry.enabled condition. Verify the retry behavior when the property is omitted and when it is explicitly set, using the linked Spring Cloud Kubernetes report as context; done means Consul no longer enables retry unconditionally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100