graphql-engine icon indicating copy to clipboard operation
graphql-engine copied to clipboard

Hasura deploy fails with Event trigger does not exist

Open browniefed opened this issue 2 years ago • 0 comments

Version Information

Server Version: v2.9.0 + v2.10.0-beta.1 CLI Version (for CLI related issue): v2.9.0 + v2.10.0-beta.1

Environment

MacOS 12.4 docker-compose

What is the current behaviour?

When attempting to stand up Hasura from an empty state locally with migrations and metadata that includes an event trigger.

Running hasura deploy will apply metadata, and migrations, but then fail with the below error.

ERRO applying metadata failed
FATA[0004] operation failed: error applying metadata
{
  "code": "not-exists",
  "error": "event trigger \"project_invite\" does not exist",
  "path": "$.args"
}

The command fails, but the migrations and metadata, and the event triggers are created.

This requires a hasura metadata reload to fix.

Running

hasura metadata apply
hasura migrate apply
hasura metadata reload

Does work.

What is the expected behaviour?

The hasura deploy command doesn't fail.

How to reproduce the issue?

  1. Setup local hasura project in docker compose.
  2. Add migrations + insert event trigger on a table
  3. docker compose down --volumes remove all mounted data in postgres
  4. docker compose up -d to restart in empty state
  5. hasura deploy
  6. Error

Please provide any traces or logs that could help here.

Any possible solutions?

No

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?

No

browniefed avatar Aug 04 '22 14:08 browniefed

@browniefed Thanks for reporting this. We were able to reproduce the issue.

harishnair96 avatar Aug 16 '22 12:08 harishnair96

Closing in favour of duplicate #8819

seanparkross avatar Aug 25 '22 11:08 seanparkross