Event Trigger does not work after CLI Metadata & Migrate Initialization
Version Information
Server Version: v2.8.0 CLI Version (for CLI related issue): v2.8.0
Environment
Local MacOS (Intel)
What is the expected behaviour?
Event trigger should work after using CLI:
hasura metadata apply
hasura migrate apply
hasura metadata apply
The insert event trigger should fire when a record is inserted into the related table.
Keywords
event trigger metadata migration
What is the current behaviour?
The event trigger is created, but the event trigger (insert) does not fire when a record is inserted.
This may be related to #8376
How to reproduce the issue?
Please see the instructions in this repo
Screenshots or Screencast
See repo above
Please provide any traces or logs that could help here.
Running the example in the repo above will create logs that could help
Any possible solutions?
The following steps fix the problem and create a working event trigger
hasura metadata apply
hasura migrate apply
hasura metadata clear
hasura metadata apply
Can you identify the location in the source code where the problem exists?
No
If the bug is confirmed, would you be willing to submit a PR?
N/A
Same bug exists on 2.8.4 & 2.10.0. This is a severe issue since makes cli-migrations-v3 image kind of useless when having triggers set.
I'm having the same error with hasura/graphql-engine:v2.8.4.cli-migrations-v3 Docker image. It's a severe issue because triggers are not created on startup
The bug applies to versions > 2.8 Have tried all versions from 2.9.1 -> 2.11.1 and all exhibit the same behaviour.
The workaround mentioned above does work, but I needed to add a hasura metadata reload command as well in order for metadata to be consistent.
Thanks for reporting the issue. We're actively working on a fix and this will be resolved soon.
Closed via 8dab7df16924a5c3bf28f90c392752638942e5b3