1.3.0-beta.2 now expects metadata/cron_triggers.yaml, but this file didn't exist in 1.2.x
I recommend treating it as empty if it doesn't exist otherwise you'll have a bunch of folks who can't upgrade until they manually create the missing file with [] inside.
time="2020-06-22T02:08:06Z" level=fatal msg="failed to apply metadata: cannot apply metadata on the database: cannot build cron_triggers from metadata: open /tmp/hasura-project/metadata/cron_triggers.yaml: no such file or directory"
Hey @jflambert , that's concerning. Just wanted to gather a bit more info.
v1.3.0-beta.2v1.2.2) and it failed right?
If yes, can you after step 1, do a metadata export and then move to step 2 and see if you encounter the same error?
docker-compose.yaml file with v1.2.2.cli-migrations-v2 (see below)hasura update-cli --version v1.2.2hasura init, docker-compose-up -d, cd hasura, hasura md export, cd .., docker-compose downdocker-compose up, confirm metadata gets applied in docker logs, ctrl+cv1.3.0-beta.2.cli-migrations-v2docker-compose up, it'll crash because cron_triggers.yaml does not existsample docker-compose file
version: '3.6'
services:
postgres:
image: timescale/timescaledb:latest-pg12
ports:
- "5432:5432"
restart: always
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: testdb
POSTGRES_PASSWORD: postgrespassword
TIMESCALEDB_TELEMETRY: "off"
graphql-engine:
image: hasura/graphql-engine:v1.2.2.cli-migrations-v2
ports:
- "8080:8080"
depends_on:
- "postgres"
restart: always
volumes:
- ./hasura/migrations:/hasura-migrations
- ./hasura/metadata:/hasura-metadata
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/testdb
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_ENABLE_TELEMETRY: "false"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
volumes:
db_data:
Thanks @jflambert, got it. Will address this ASAP
A quick fix that worked for me is creating an empty cron_triggers.yaml file with [] as content!
Confirmed this works for me in 1.3.0-beta.3, thanks @scriptonist
Only issue is I don't see your message "metadata file for %s was not found, assuming an empty file" appearing, that must be due to my log level being inadequate?
@jflambert cool, the --log-level should be debug for that to appear.