Open asmisha opened 2 years ago
Same issue with
INFO hasura cli version=v2.3.0-beta.1
INFO hasura graphql engine endpoint="http://localhost:8087/" version=v2.1.1
and with:
INFO hasura cli version=v2.3.0-beta.1
INFO hasura graphql engine endpoint="http://localhost:8087/" version=v2.2.0
rest_endpoints.yaml
file is not even created in metadata directory.
even if I create this file manually, and enter correct YAML data there, metadata apply
has no effect, REST endpoint is not re-created.
However if you create REST endpoint, export metadata. Destroy hasrua, start up anew and import metadata, then REST endpoints appear again. But this is not a good solution.
You can hack your way around the issue by creating a script that writes the rest_endpoints.yml
file by using the metadata from the database. And another script that 'applies' it by reading from the rest_endpoints.yml
file that we generated ourselves and updates the metadata in the database again.
When using Postgres the metadata are stored in hdb_catalog.hdb_metadata
.
Buuuut of course, this is far from ideal and I really hope this is gonna be fixed. But since it's not relevant for the paid cloud version, priority might not be too high on that one 😅
Is there any update on this issue ?
Workaround:
REST_ENDPOINTS_METADATA="$(python3 -c 'import sys, yaml, json; y=yaml.safe_load(sys.stdin.read()); print(json.dumps(y))' < "$REST_ENDPOINTS_METADATA_FILE")"
psql -d $HASURA_GRAPHQL_DATABASE_URL -P pager -c "UPDATE hdb_catalog.hdb_metadata SET metadata = jsonb_insert(metadata::jsonb, '{rest_endpoints}', '$REST_ENDPOINTS_METADATA'::jsonb, false)"
Is there an update to this? The issue still exists in v2.8.3
I'm running into the same issue. REST endpoints aren't being exported or imported properly.
Hasura version: v2.8.3 Hasura CLI: v2.8.3
Update:
I upgraded to Hasura v2.10.0
and Hasura CLI v2.9.0
(seemingly latest stable version of both) and it still doesn't work.
It seems like this is still not fixed (v2.34). Are there any plans to address this?
Version Information
INFO hasura cli version=v2.0.9 INFO hasura graphql engine endpoint="http://localhost:8080/" version=v2.0.10
Environment
Self-hosted
What is the expected behaviour?
Rest endpoints are loaded from config files
Keywords
rest endpoint, metadata, migrations
What is the current behaviour?
Rest endpoints are not loaded from config files
How to reproduce the issue?
Any possible solutions?
rest_endpoints is not saved to config files as far as I see - need to save it along with other pieces of metadata.