hasura / hasura/graphql-engine
pg_untrack_function does not persist
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version:
CLI Version (for CLI related issue): 2.0.7
### Environment
docker
### What is the expected behaviour?
Calling the `/v1/metadata` to track a function should persist it in the schema. It does not make sense to have to run the curl command each time the Hasura instance starts again, especially on production.
### Keywords
pg_untrack_function
### What is the current behaviour?
Function is tracked but disappears when server is restarted.
### How to reproduce the issue?
1. Send the request to `http://localhost:8080/v1/metadata`
```json
{
"type": "pg_track_function",
"args": {
"function": {
"schema": "public",
"name": "me"
},
"source": "default",
"configuration": {
"session_argument": "hasura_session"
}
}
}
```
2. Restart server
3. Tracked function is gone
### Any possible solutions?
Have the tracked function being written into metadata on file system.
Contributor guide
Research direction
Start by tracing the /v1/metadata pg_track_function request and the metadata loaded during server startup. Reproduce the issue with the provided request, restart the Hasura instance, and verify that the tracked function persists afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, postgres
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100