An attempt to demonstrate Hasura's irritating handling of offline remote schemas as invalid metadata. Executing docker-compose up
will trigger the following sequence:
postgres
starts and creates three databases:parent
,child1
,child2
hasura-parent
starts with two remote schemas:hasura-child1
andhasura-child2
hasura-child1
starts immediately, and isn't a problem forhasura-parent
hasura-child2
sleeps for 121 seconds during the first migration step.hasura-parent
crashes and restarts 10 times while waiting forhasura-child2
hasura-child2
eventually starts, andhasura-parent
finally starts too.
There are two main problems here
hasura-parent
should be able to start immediately despite one of the remote schemas being "offline" (Issue #5117). It's no different from being able to add remote schemas after initialization.- Given the 60 seconds timeout value,
hasura-parent
should only restart 3 or 4 times (Issue #5126). It restarts 10 times with this test:
$ docker inspect --format "NAME: {{.Name}} RESTARTS: {{.RestartCount}}" $(docker ps -aq)
NAME: /hasura-remote-schema_hasura-child2_1 RESTARTS: 0
NAME: /hasura-remote-schema_hasura-child1_1 RESTARTS: 0
NAME: /hasura-remote-schema_hasura-parent_1 RESTARTS: 10
NAME: /hasura-remote-schema_postgres_1 RESTARTS: 0