#140 Add healthcheck API endpoint
Merged by jskladan. Opened by lholecek.
taskotron/ lholecek/resultsdb healthcheck  into  develop

Download 140.patch

JIRA: FACTORY-5428

Signed-off-by: Lukas Holecek hluk@email.cz

@lucarval, @lslebodn Please review.

Looks good overall, but couple of nitpicks:

  • the whole API is JSON based ATM, so i'd rather see the responses be in that line (return jsonify({"message": MESSAGE}), HTTP_STATUS), just to keep things consistent
  • I don't think the HTTP response code on the 'failed' path is best suited for the job. I think HTTP 5xx (IMO 503 suits the best, but generic 500 would be fine) would be semantically better. Once again, this is not really a huge issue, obviously.

Once these are resolved, I'll be happy to merge the PR. Thanks!

rebased onto bd1f6b8436a0af8bd16450b3bcb09b3acc008463

rebased onto 9250ae962b96ac00e0160e80af15b4adf4750d66

OK, I've changed the healthcheck response to JSON and HTTP status for failure to 503.

Looks OK to me, thanks. Not the biggest fan of general except Exception but in this specific case, I think it's fine.

If @lucarval or @lslebodn won't give any negative feedback, I'll merge the PR tomorrow.

Thanks again @lholecek

:thumbsup: LGTM!

I have zero experience with resultsdb internals.
I am not sure whether I am the best for review. But code LGTM :-)

@lslebodn Oops, sorry, I mistakenly pinged you for review instead of jskladan. :)

Hehe, things happen. Merging...

Pull-Request has been merged by jskladan

Metadata