hasura / hasura/graphql-engine

metadata apply end with an error: "key "tables" not found"

Open
#7,947 5 comments 1 reaction 0 assignees View on GitHub
c/cli k/bug t/product-platform
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: v2.0.9
CLI Version (for CLI related issue): v2.0.0-beta.2

### Environment

Docker

### What is the expected behaviour?

I want to apply my local metadata on my hasura server using `hasura metadata apply --admin-secret=password --endpoint=http://my-server:9999`

### Keywords

cli, metadata, apply

### What is the current behaviour?

Running apply always end with an error.

### How to reproduce the issue?

1. Enter hasura project dir
2. Make sure you have the right directory structure. Otherwise, you can use `hasura init` and `hasura export` to get it.
3. Run `hasura metadata apply --admin-secret=password --endpoint=http://my-server:9999`

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

DEBU global config file exists, verifying contents
DEBU global config is pre-set to &cli.GlobalConfig{UUID:"c88c7903-e253-4476-a637-74efee41eebf", EnableTelemetry:true, ShowUpdateNotification:true, CLIEnvironment:"default"}
DEBU global config: uuid: c88c7903-e253-4476-a637-74efee41eebf
DEBU global config: enableTelemetry: true
DEBU global config: showUpdateNotification: true
DEBU global config: cliEnvironment: default
DEBU cannot get config information from server, this might be because config API is not enabled: json: cannot unmarshal object into Go struct field HasuraServerInternalConfig.jwt of type string
DEBU graphql engine endpoint: http://my-server:9999/
DEBU graphql engine admin_secret: hasura
DEBU versions: cli: [v2.0.0-beta.2] server: [v2.0.9]
DEBU compatibility check: [true] compatible CLI and Server
DEBU server: uuid: 2bccf5ec-2799-43fa-aed9-0461688f8cf5
DEBU metadata file for tables was not found, assuming an empty file
DEBU metadata file for functions was not found, assuming an empty file
DEBU metadata file for remote_schemas was not found, assuming an empty file
DEBU metadata file for query_collections was not found, assuming an empty file
DEBU metadata file for allowlist was not found, assuming an empty file
DEBU metadata file for actions was not found, assuming an empty file
DEBU metadata file for cron_triggers was not found, assuming an empty file
DEBU telemetry: beamed fields.time=550.246222ms isError=true

"FATA[0000] error applying metadata
{
"path": "$.args",
"error": "key "tables" not found",
"code": "parse-failed"
}"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.