Skip to content

Conversation

@ystarikovich
Copy link

To follow Spring best practices and give a possibility to disable/enable health indicator @ConditionalOnEnabledHealthIndicator was introduced

…ces and give a possibility to disable/enable health indicator
@kagkarlsson
Copy link
Owner

Excellent! I am unfortunately not very familiar with Spring Boot best practices, can I find them somewhere?

So with this change you have to "opt-in" to get a HealthIndicator?
Are HealthIndicators primarily used to indicate the healthiness of the application, i.e. if it should receive traffic?

@ystarikovich
Copy link
Author

ystarikovich commented Jan 22, 2020

I attached a link in the README to the spring documentation, there is information how HealthIndicators are living in the Spring ecosystem and also how anyone can configure behaviour of particular indicator or all indicators in general. Within this PR basically we are following standard pattern of Spring Guys with HealthIndicator.

There is no possibility to control this HealthCheck behaviour right now. From perspective of our application and maybe someone else will have the same problem, db-scheduler availability should not be a indicator for container orchestration framework to kill instance of application as this is non critical part and application should receive traffic if something happened with db-scheduler.

@kagkarlsson
Copy link
Owner

I agree that if the HealthIndicator is used to signal the health/readiness of the application it should default to off, since db-scheduler is really a sort of independent sub-system living in the same JVM. We can serve user-traffic without it.

@kagkarlsson kagkarlsson merged commit 22b8ef8 into kagkarlsson:master Jan 23, 2020
@kagkarlsson
Copy link
Owner

Let me know if you need a release with this fix.

@ystarikovich
Copy link
Author

Would appreciate if you can release this as right now we are using workaround for this.

@ystarikovich ystarikovich deleted the spring_approach_for_health_indicator branch January 23, 2020 10:34
@kagkarlsson
Copy link
Owner

Np. Release 6.6 should be available in central now 👍

evenh pushed a commit to evenh/db-scheduler that referenced this pull request Oct 1, 2020
…or_health_indicator

Add @ConditionalOnEnabledHealthIndicator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants