hasura / hasura/graphql-engine

Deployment fails after upgrade from 1.3.3 to 2.0.10 related to hnd_catalog.event_log

Open
#7,835 5 comments 0 reactions 0 assignees View on GitHub
a/eventing/data-triggers k/bug
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

Cannot deploy after my upgrade from 1.3.3 to 2.0.10, I had exposed the the hbd_catalog.event_log in a VIEW and while starting up hasura runs some commands to ALTER the LOCKED column on hbd_catalog.event_log which fails because the VIEW depends on it. Deleted the view and now I'm getting this in my ECS logs:

```
{"type":"event-trigger","timestamp":"2021-11-22T07:11:53.187+0000","level":"error","detail":{"internal":{"statement":"\n UPDATE hdb_catalog.event_log\n SET locked = 't'\n WHERE id IN ( SELECT l.id\n FROM hdb_catalog.event_log l\n WHERE l.delivered = 'f' and l.error = 'f' and l.locked = 'f'\n and (l.next_retry_at is NULL or l.next_retry_at <= now())\n and l.archived = 'f'\n ORDER BY created_at\n LIMIT $1\n FOR UPDATE SKIP LOCKED )\n RETURNING id, schema_name, table_name, trigger_name, payload::json, tries, created_at\n ","prepared":true,"error":{"exec_status":"FatalError","hint":null,"message":"invalid input syntax for type timestamp with time zone: \"f\"","status_code":"22007","description":null},"arguments":["(Oid 20,Just (\"\\NUL\\NUL\\NUL\\NUL\\NUL\\NUL\\NULd\",Binary))"]},"path":"$","error":"database query error","code":"unexpected"}}
```

Related to [closed but unsolved issue](https://github.com/hasura/graphql-engine/issues/7087)

Contributor guide

Open the contributing guide

Research direction

The payload names no source file or test; begin with the startup migration touching hdb_catalog.event_log and the event-trigger UPDATE shown in the ECS log, then read related issue #7087. Done means an upgrade from 1.3.3 to 2.0.10 completes with dependent views intact and event-trigger processing no longer produces the reported timestamp error.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.