I try to apply my local hasura metadata(tables.yaml) file on my server, using hasura metadata apply --admin-secret=password --endpoint=http://my-server:9999
It always ends with:
"FATA[0000] error applying metadata
{
"path": "$.args",
"error": "key "tables" not found",
"code": "parse-failed"
}"
I also tried to add log-level debug, but I can't find anything helpful there:
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
I can tell I execute the apply command from the right project directory, and I can export metadata from the same server with no problems.
I'm afraid I'm missing a config file or something similar, any ideas?