spicedb
spicedb copied to clipboard
CRDB/PostrgreSQL datastores do not timeout on initialization
If CRDB/PostgreSQL datastores are initialized on an unreachable/unresponsive database backend, the initialization hangs indefinitely, and the spicedb process wont report becoming healthy.
We can see this is caused by a missing deadline:
https://github.com/authzed/spicedb/blob/26d13e56948492537e02501c8d018e0def5ad204/internal/datastore/crdb/crdb.go#L92-L95