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

The dependencies.json file should allow an override check condition (for non NAME services) #37

Open
ctorrao opened this issue Oct 19, 2018 · 1 comment

Comments

@ctorrao
Copy link
Member

ctorrao commented Oct 19, 2018

When we have an external dependency that does not have NAME nor we can control the source code of that dependency it makes sense to allow a different dependency check. For instance, check for a simple HTTP GET an check the returned HTTP Status Code.

Proposal of change:
{ "name": "WebPA Tridium", "min_version": "1.0", "max_version": "1.*", "check_override_uri": "{connection_string}/health", "check_override_codes": "200;400;401", "connection_string": { "locator": "IConfiguration", "key": "WebPaHttpClient:BaseUrl" } }

New properties:

  • check_override_uri
    The URI used to check if the dependency is up and running
  • check_override_codes
    The accepted HTTP status codes (or that follow the same network like status code format) for the NAME to consider the dependency status as "Ok", otherwise it should be considered "Error"
@Symbianx
Copy link
Contributor

I understand the requirement, but I don't think the best way to handle it is to have such a generic implementation.

We already have the IVersionResolver interface which exposes the contract to fetch the state of a dependency. I think we should leverage this and allow the developer to specify its own implementation.

Just like what we did for the IConnectionStringProvider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants