Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Making Elasticsearch Version injectable. #3896
Motivation and Context
This allows us to reuse the mechanism of retrieving the version of the
Types of changes
referenced this pull request
Jun 8, 2017
Ideally we would never do any IO in providers, because the user is not necessarily aware that the injection might fail (and it might fail multiple times, block indefinitely, or otherwise throw exceptions).
It is greatly preferable to inject something that gives you a service that can be used to retrieve the information, because then the user will see a TimeoutException etc being declared.