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

Add id field to outputted checks #122

Merged
merged 1 commit into from
Mar 4, 2020
Merged

Conversation

nickramsbottom
Copy link
Contributor

@nickramsbottom nickramsbottom commented Mar 4, 2020

The healthcheck standards specify that each individual check requires an id. This adds an id to the check output as an optional argument.

Healthcheck standards

It may be worth making it required here but it would be a more significant breaking change

The healthcheck standards specify that each individual check requires
an id. This adds an id to the check output as an optional argument

Healthcheck standards: https://docs.google.com/document/d/18hefJjImF5IFp9WvPAm9Iq5_GmWzI9ahlKSzShpQl1s/edit#
@andygout
Copy link
Contributor

andygout commented Mar 4, 2020

Seems super weird that it is not one of the props that would cause this error to throw if absent: https://github.com/Financial-Times/n-health/blob/master/src/checks/check.js#L24.

@andygout
Copy link
Contributor

andygout commented Mar 4, 2020

It may be worth making it required here but it would be a more significant breaking change

I think there has to be an approach to this (and is very likely bikeshedding), but to add this change, then ensure all healthchecks are providing an id, and then make it a mandatory field here.

And it might also be worth checking if that Healthcheck Standards doc is still up-to-date so that if we did go to the trouble of adding ids that the healthcheck aggregator would still want to make use of those values.

@nickramsbottom
Copy link
Contributor Author

@andygout I agree with you on both points. I think it's something we could raise at dev huddle as a follow up to this PR?

@andygout
Copy link
Contributor

andygout commented Mar 4, 2020

Should we do that first or are you looking to merge this sooner?

My other outstanding concern would be that this is likely to produce a lot of ids that are undefined. Could that potentially cause issues further down the trail (e.g. between here and healthcheck aggregators like Heimdall)?

@nickramsbottom
Copy link
Contributor Author

Looking to merge sooner than that ideally.

I don't know what harm that could cause but fields such as businessImpact are treated in the same way

Copy link
Contributor

@andygout andygout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If businessImpact is same then should be okay.

@nickramsbottom
Copy link
Contributor Author

nickramsbottom commented Mar 4, 2020

ohhh hang about, businessImpact is also a required field

checked the output in use, if the id is undefined it isn't shown on the health endpoint

@nickramsbottom nickramsbottom merged commit 310b1f9 into master Mar 4, 2020
@nickramsbottom nickramsbottom deleted the add-id-to-checks branch March 4, 2020 13:34
JSRedondo pushed a commit that referenced this pull request Jun 20, 2022
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