hasura / hasura/graphql-engine
Long Hasura trigger names clobbering when multiple operations are selected
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
2.0.10
Server Version:
CLI Version (for CLI related issue):
### Environment
OSS
### What is the expected behaviour?
When we create a trigger name that is too long the names clobber into a single Postgres trigger function.
This was mostly addressed in https://github.com/hasura/graphql-engine/issues/5786 however, there is no metadata check on the trigger name length, so if someone were to edit the raw YAML, they could run into the same issue.
The proposed/expected behaviour would be for a trigger name that is too long would fail the hasura metatdata inconsistency check.
### Keywords
Trigger
### What is the current behaviour?
Current behaviour is that a single trigger function is created if multiple trigger operations are selected.
### How to reproduce the issue?
1. Create a hasura trigger for update and insert
2. Rename the trigger in the YAML to have a length longer than 49 characters
3. Apply hasura metadata
### Screenshots or Screencast
### Please provide any traces or logs that could help here.
### Any possible solutions?
Should fail hasura metadata inconsistency check.
### Can you identify the location in the source code where the problem exists?
### If the bug is confirmed, would you be willing to submit a PR?
Possibly, I don't know the source code at all, but if someone could point me in the right direction...
Contributor guide
Assessment
This issue has not been assessed yet.