Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reactive HealthContributors do not hide non-reactive ones #18748

Closed
hban opened this issue Oct 25, 2019 · 1 comment
Closed

Reactive HealthContributors do not hide non-reactive ones #18748

hban opened this issue Oct 25, 2019 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@hban
Copy link

hban commented Oct 25, 2019

Lettuce connection factory, which is both reactive and non-reactive, has two active health indicators when running Boot 2.2.0.

Output of /actuator/health:

{ 
   "status":"UP",
   "components":{ 
      "redis":{ 
         "status":"UP",
         "details":{ 
            "cluster_size":2,
            "slots_up":16384,
            "slots_fail":0
         }
      },
      "redisReactive":{ 
         "status":"UP",
         "details":{ 
            "version":"5.0.5"
         }
      }
   }
}

Only reactive indicator was active in Boot 2.1.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 25, 2019
@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 25, 2019
@philwebb philwebb added this to the 2.2.x milestone Oct 25, 2019
@nosan
Copy link
Contributor

nosan commented Oct 25, 2019

@philwebb,
It looks like that bug affects all HealthIndicators, not only Redis.

Previously, @ConditionalOnMissingBean(name="...") was the same for both indicators, now it different.
For this particular case:

	@ConditionalOnMissingBean(name = { "redisHealthIndicator", "redisHealthContributor" })
	public HealthContributor redisHealthContributor(Map<String, RedisConnectionFactory> redisConnectionFactories) {
		return createContributor(redisConnectionFactories);
	}


	@Bean
	@ConditionalOnMissingBean(name = { "redisReactiveHealthIndicator", "redisReactiveHealthContributor" })
	public ReactiveHealthContributor redisReactiveHealthContributor() {
		return createContributor(this.redisConnectionFactories);
	}

}

This commit: f09e026 added these changes

@snicoll snicoll self-assigned this Oct 28, 2019
@snicoll snicoll changed the title RedisReactiveHealthIndicator doesn't hide non-reactive one Reactive HealthContributors do not hide non-reactive ones Oct 28, 2019
@snicoll snicoll modified the milestones: 2.2.x, 2.2.1 Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

5 participants