hasura / hasura/graphql-engine

When specifying a different metadata db, event triggers are recreated

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

Description

### Version Information

Server Version: v2.20.1
CLI Version (for CLI related issue):

### Environment

CE, running locally on Docker

### What is the current behaviour?

I am providing Hasura with a metadata db URL and a graphql db URL. Hasura seems to read correctly from the metadata db - remote schemas etc. are all visible over the console and I get the green checkbox.

However, it wants to write to the hdb schema on the graphql db - for example changes to permissions, event logs etc.

### What is the expected behaviour?

The console should respect the metadata url and write to the same metadata db that it is reading from.

### How to reproduce the issue?

1. Set up ur metadata using the migrations image
2. Start the hasura grapqhl server and provide a metadata db url and graphql db url
3. Ensure that the username used for the graphql db does not have write permissions on the hdb schema of the graphql db ( otherwise it will just silently write to that db without errors). Ensure that the username used for the metadata db has permission to write to the hdb schema of the metadata db.
4. Do something over the console that changes the metadata (like updating permissions)
5. Notice the logs complaining that it does not have permission to write to the hdb schema.

### Screenshots or Screencast

### Please provide any traces or logs that could help here.

### Any possible solutions/workarounds you're aware of?

We keep our metadata as yaml. I can modify the metadata yaml files and start the migrations image - it will update the correct metadata db and loading the graphql engine subsequently will reflect the metadata changes.

### Keywords

metadata, hasura console

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue using separate metadata and GraphQL database URLs, following the listed permission setup and console metadata change. Start by tracing which database receives writes for permissions and event logs, then verify that all metadata writes use the configured metadata database without requiring access to the GraphQL database's hdb schema.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
backend-api-design, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.