graphql-engine
graphql-engine copied to clipboard
Extend /healthz failure to empty metadata
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.
@rikinsk any feedback? is there an alternative I'm unaware of?