spring-cloud / spring-cloud/spring-cloud-consul

EnableRetry is enabled un-conditionally

Open
#766 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.