hasura / hasura/graphql-engine

Upgrading from 2.12.1 to 2.23.0 breaks graphql-engine serve

Open
#9,598 1 comment 0 reactions 0 assignees View on GitHub
k/bug t/gql-services
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: v2.23
CLI Version (for CLI related issue): v2.23

### What is the current behaviour?

When upgrading from 2.12.1 to 2.23.0 and changing no configurations the `graphql-engine serve` command does not finish.

It gets stuck at "resource {resource_name} has not been initialized yet"

### What is the expected behaviour?

Seamless upgrade from 2.12.1 to 2.23.0

### How to reproduce the issue?

1. Upgrade from 2.12.1 to 2.23.0
2. Run `graphql-engine serve` command

### Please provide any traces or logs that could help here.

```
{"detail":{"info":{"admin_secret_set":true,"auth_hook":"http://myapi/myapi/auth-webhook","auth_hook_mode":"GET","console_assets_dir":null,"console_sentry_dsn":null,"cors_config":{"allowed_origins":"*","disabled":false,"ws_read_cookie":null},"enable_allowlist":false,"enable_console":true,"enable_maintenance_mode":false,"enable_metadata_query_logging":false,"enable_telemetry":true,"enabled_apis":["config","pgdump","metadata","graphql"],"enabled_log_types":["webhook-log","http-log","startup","query-log","websocket-log"],"events_fetch_batch_size":100,"experimental_features":["inherited_roles"],"graceful_shutdown_timeout":60,"infer_function_permissions":true,"jwt_secret":[],"live_query_options":{"batch_size":100,"refetch_delay":1},"log_level":"info","port":80,"remote_schema_permissions":false,"server_host":"HostAny","stringify_numeric_types":false,"transaction_isolation":"ISOLATION LEVEL READ COMMITTED","unauth_role":null,"use_prepared_statements":true,"v1-boolean-null-collapse":false,"websocket_compression_options":"NoCompression","websocket_connection_init_timeout":"Refined (Seconds {seconds = 3s})","websocket_keep_alive":"KeepAliveDelay {unKeepAliveDelay = Refined (Seconds {seconds = 5s})}"},"kind":"server_configuration"},"level":"info","timestamp":"2023-04-21T19:58:56.599+0000","type":"startup"}
{"detail":"Thread SchemeUpdate.listener (re)started","level":"info","timestamp":"2023-04-21T19:58:56.599+0000","type":"unstructured"}
{"detail":"Thread ourIdleGC (re)started","level":"info","timestamp":"2023-04-21T19:58:56.599+0000","type":"unstructured"}
{"detail":{"info":{"message":"source \"myapi4\" has not been initialized yet.","source":"myapi4"},"kind":"source_catalog_migrate"},"level":"info","timestamp":"2023-04-21T19:58:56.599+0000","type":"startup"}
{"detail":{"info":{"message":"source \"myapi2\" has not been initialized yet.","source":"myapi2"},"kind":"source_catalog_migrate"},"level":"info","timestamp":"2023-04-21T19:58:56.599+0000","type":"startup"}
{"detail":{"info":{"database_url":"postgresql://hasurauser:...@[redacted_pg_uri:5432/myapi-dev?sslmode=verify-full](redacted_pg_uri:5432/myapi-dev?sslmode=verify-full)","retries":1},"kind":"postgres_connection"},"level":"info","timestamp":"2023-04-21T19:58:56.599+0000","type":"startup"}
{"detail":{"info":"Already at the latest catalog version (48); nothing to do.","kind":"catalog_migrate"},"level":"info","timestamp":"2023-04-21T19:58:56.599+0000","type":"startup"}
{"detail":{"info":"Schema sync enabled. Polling at Refined (Milliseconds {milliseconds = 1s})","kind":"schema-sync"},"level":"info","timestamp":"2023-04-21T19:58:56.599+0000","type":"startup"}
{"detail":{"info":{"instance_id":"89b02774-f575-418c-837b-2809c09419a4","message":"listener thread started","thread_id":"ThreadId 59"},"kind":"schema-sync"},"level":"info","timestamp":"2023-04-21T19:58:56.599+0000","type":"startup"}
{"detail":{"info":"EE client credentials not present in the metadata database. Hasura EE features are disabled.","kind":"license_info"},"level":"warn","timestamp":"2023-04-21T19:58:56.599+0000","type":"startup"}
{"detail":{"info":{"message":"source \"myapi3\" has not been initialized yet.","source":"myapi3"},"kind":"source_catalog_migrate"},"level":"info","timestamp":"2023-04-21T19:58:57.877+0000","type":"startup"}
{"detail":{"info":{"message":"source \"myapi5\" has not been initialized yet.","source":"myapi5"},"kind":"source_catalog_migrate"},"level":"info","timestamp":"2023-04-21T19:58:57.877+0000","type":"startup"}

```
### Keywords

init graphql-engine

Contributor guide

Open the contributing guide

Research direction

Reproduce the 2.12.1-to-2.23.0 upgrade and run the `graphql-engine serve` command, using the supplied startup logs as the starting point. Trace the `source_catalog_migrate` messages and schema-sync initialization; done means the server completes startup instead of remaining stuck while sources are uninitialized.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, postgresql
Domain
api, backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.