Open corsali-albert opened 2 years ago
Casing should match the tables.yaml
file. The error could be clearer, but the behavior itself is expected. Do note that linux filesystems are case sensitive. Be careful when manually editing metadata files.
Curious why you would rename the files?
I'm not sure why the file was named improperly (caught in a PR of someone else's code), but perhaps it was an initial table creation that was then re-cased -- would that cause a renaming of the file with the updated case?
This was more about the non-specific error, though; when googling for it, there several other "well, something is wrong with your hasura config somewhere" suggestions, none of which were helpful to debug. At the very least, hopefully this issue will be in the pool of others when that error occurs.
Agree that we should have some more helpful error messages for those cases. The error message "key \"sources\" not found"
means there was an unhandled error in parsing the metadata from the metadata files.
For your specific case, I was able to track down a bug in cli/console behavior, and I opened issue #7866
That said, we should also improve error messages for those cases, so I am not closing this issue
Version Information
Server Version: v2.0.10 CLI Version (for CLI related issue): v2.0.10
Environment
Cloud and Docker
What is the expected behaviour?
Metadata apply should work
Keywords
metadata, sources, parse
What is the current behaviour?
Metadata apply fails with below error.
How to reproduce the issue?
metadata/.../public_table.yml
file tometadata/.../public_Table.yml
.Any possible solutions?
Ensure all table file names are all lower-case (or that they match the
tables.yml
file, not sure which is required).If the bug is confirmed, would you be willing to submit a PR?
Not sufficiently familiar with this code base, sorry! If someone pointed me to the location where such a change could be made, I'd be happy to though.