Graphql-engine: Unable to Upgrade Hasura Docker Container pointed at External Database

Created on 7 Jan 2020  路  5Comments  路  Source: hasura/graphql-engine

PROBLEM: Upgrading from beta10 to release1 latest gives:

{"path":"$","error":"unsupported version : 27","code":"not-supported"}

I have not for the life of me been able to figure out the proper upgrade path for hasura docker instances that connect to external databases.

we get the unsupported version error any time we recreate a docker container with a new version of hasura that points at an existing database. :-(

What is the correct way to upgrade a hasura instance (docker container pointed at an external db) like ours? How do we fix this issue without losing data? I cannot find any documentation and searches all turn up people with the same issue and no resolution. If anyone can please help with info that would be greatly appreciated.

question

Most helpful comment

we get the unsupported version error any time we recreate a docker container with a new version of hasura that points at an existing database. :-(

This error message is thrown when an graphql-engine is run against a database which was initialized by a newer version. You shouldn't be seeing this message unless you are downgrading.

switched to explicit version hasura/graphql-engine:v1.0.0 instead of latest and issue resolved.

latest tag is not a good idea with docker images as docker wouldn't pull the latest version of the image (and will use an older cached image) unless asked explicitly. We recommend you to use the exact version number in your docker images.

Upgrading is as simple as changing the version number, however downgrading needs a bit of manual intervention but we are planning to fix it very soon.

All 5 comments

switched to explicit version hasura/graphql-engine:v1.0.0 instead of latest and issue resolved.
what triggers this message/issue? Any ideas?

this message is thrown, when hasura doesn't know what to do with your catalog version. beta releases and rc releases are showing weird incompatibilities. In such cases, I do upgrades manually by clearing catalog schemas (hdb_*) in database and reload metadata. There Hasura recreates catalog, instead of trying to update it.

thank you, that is very helpful.

we get the unsupported version error any time we recreate a docker container with a new version of hasura that points at an existing database. :-(

This error message is thrown when an graphql-engine is run against a database which was initialized by a newer version. You shouldn't be seeing this message unless you are downgrading.

switched to explicit version hasura/graphql-engine:v1.0.0 instead of latest and issue resolved.

latest tag is not a good idea with docker images as docker wouldn't pull the latest version of the image (and will use an older cached image) unless asked explicitly. We recommend you to use the exact version number in your docker images.

Upgrading is as simple as changing the version number, however downgrading needs a bit of manual intervention but we are planning to fix it very soon.

Ah, so this typically only happens on downgrades? hmmm.
Maybe latest wasn't grabbing the latest locally, because the explicit number version worked, that makes a lot of sense. 馃憤

This really helped clear up this mysterious error, when one might experience this, what the cause is, and ways to resolve it. 馃憦

  1. The unsupported version error occurs when a container is applied to a database that has already had a newer hasura version applied to it. (downgrades)

  2. To fix one can change the version being used to a newer version or return to the last known working applied version.

  3. If really needing to downgrade one can try removing the hdb_* tables and reimporting or reloading the metadata.

  4. The hasura team plans on making this easier/cleaner to eliminate the issue and/or ?improving? the error message and documentation so that people can figure out what to do when this occurs.

sounds fantastic! 馃帀

Thanks for chiming in and clearing this up! 馃弳

A little knowledge took this from scary mysterious breakage and appearance of fragility to relatively simple thing to deal with, once we knew what was happening and why. This was the missing information. Hopefully others experiencing this will find this thread and be helped as i was. Kudos.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lishine picture lishine  路  3Comments

rikinsk-zz picture rikinsk-zz  路  3Comments

bogdansoare picture bogdansoare  路  3Comments

sachaarbonel picture sachaarbonel  路  3Comments

jjangga0214 picture jjangga0214  路  3Comments