graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Extend /healthz failure to empty metadata

Open jflambert opened this issue 2 years ago • 1 comments

Is your proposal related to a problem?

Applying metadata can take many seconds, if not minutes. During that time, /healthz reports 200 OK, even with strict=true, because nothing is inherently wrong with Hasura. But I want consumers to handle empty metadata the same way as broken metadata.

And by "empty metadata" I mean whichever state the metadata is in when Hasura is launched for the very first time.

Describe the solution you'd like

Add another argument to /healthz that returns 500 if metadata is empty. For example /healthz?strict=true&empty=true would return 500 if metadata is either inconsistent or missing.

Describe alternatives you've considered

Using export_metadata to check for {} (presumably) is not a great idea, because I'd have to do it on 200 OK, and our metadata is enormous when present.

jflambert avatar Sep 21 '23 01:09 jflambert

@rikinsk any feedback? is there an alternative I'm unaware of?

jflambert avatar Jul 25 '24 01:07 jflambert