-
Notifications
You must be signed in to change notification settings - Fork 62
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
Ensure distinct health procedure names #34
Comments
I've been reading that sentence twice, but cannot identify anything the part that makes you believe id's should be unique:
That said, it makes sense for the id's in a single, composite response to be distinct from each other, but that's merely a concern for a human operator reasoning about failed checks, no? But to be honest, i cannot remember who put this part into the doc and what it should express: |
I may have misunderstood that sentence. As I understand it, it means that the "id" of the "check" must be unique in the JSON response to be identified.
I think the sentence should be clarified as I'm not sure to understand what "support protocols that support external identifier (i.e. URI)" means or we should constrain the health check names to be unique. |
yes, it unclear. but I agree, making them distinct is probably an improvement. |
Currently we are using flat names for For example:
|
Interesting enhancement, but should probably discuss after #35 and 1.1 |
I am not sure whether this is an improvement. What’s the use case? I will prefer to leave as it is as if we force the uniqueness some old apps will stop working for no apparent reason. |
Discussion is continuing in #161 |
The current API names the health check procedure in the Response they returns.
There is no assumption on these names in the spec or the API.
However the protocol document implies that the names are unique (a.k.a id):
The specification should clarify this and the API should reflect it.
I propose the spec is amended to state that:
To enforce this, I propose we remove the
name
for theHealthStatus
interface and adds a new annotation@Health(String name)
that must be set on aHealthCheckProcedure
to identify it.During the deployment of the application, CDI can check:
@Health
annotation with an unique name. If the name is already taken, the provider will reject the procedure (and should fail the deployment).@Health
annotation, the provider will assign an unique name to the procedure.This would guarantee that there is no multiple procedures with the same name (making them ID) for a given deployment.
There is still another issue of having health check procedures with the same name in separate deployments. I'd argue that the provider COULD modify the name of the health check procedure (provided by the
@Health
annotation) to ensure uniqueness across deployments.For example, an app server would prepend the deployment name (e.g.
myapp.war
) to the name of the health check procedure.The text was updated successfully, but these errors were encountered: