Try to update .43 to .44 with yarn command:prod upgrade error APP_VERSION is not defined
I did these two command on local setup
yarn database:migrate:prod
yarn command:prod upgrade
But got error on second command:
Error in workspace xxxx: cannot run upgrade command when APP_VERSION isn not defined, please double check your env variables.
Am I missing something in the env?
14 Replies
On what twenty's version
Are you pulling from dockerhub or building from scratch?
building from scratch. v.43
Ok ! You now need to define an APP_VERSION env var starting from 0.43
As now workspace are getting versionned in db to avoid invalid upgrade ( also to ease upcoming auto migrate tool )
0.43 upgrade won't validate workspace version only populate their cols in base
You can use your own semver
On our side we infer and define APP_VERSION in dockerfiles during cd from related git tag name
Thank!
Adding APP_VERSION to env works.
Please keep in mind that you will to update each time you upgrade twenty in order to workspace de get migrated
Also I was wrong it should follow twenty's version you're building from in order for the upgrade to run successfully
I have got the same problem. Also upgrade from 0.43.0 to 0.44.0 . I modified 'TAG=v0.44.0' in .env. And 'yarn database:migrate:prod' is good, but when I try 'yarn command:prod upgrade' , got the same error.
If doing local setup then use APP_VERSION=0.43.0, check database if workspace version is updated
Please use 0.44 latest patch not 0
When working on docker images APP_VERSION is already computed in the env variable
Thanks
I updated from 0.42.0 to 0.43.0. Everything was ok during upgrading, except this error:
But it said upgrading completed at last. Will this affect updating from 0.43 to 0.44?
how to find out workspace version in database? Thanks
I updated to 0.44. But can't find version number in Admin Panel. Either Env Variables or Health Status is clickable.

Its in Core Tables -> workspace. I used DBeaver
thanks
@baon99 @soundworker2003 @prastoin - did you set the APP_VERSION=0.44 in .env? Or where did you set the APP_VERSION?
Like this or?
TAG=v0.44.0
APP_VERSION=0.44
APP_VERSION has to be a valid semver
It's a twenty-server env variable e.g
APP_VERSION=0.51.14
For a global definition better to be set in the .env
If it's for a given command depending on your os could be set in cli directly
APP_VERSION=1.0.0 my_command
@Andreas issue here was that he was upgrading using 0.44.0
and not 0.44 latest patch which is 0.44.19
We should update docs to be stricter on the version to target while upgrading or refactor the docker hub versioning to be agnonistic of the patch
version by maintaining major.minor
mirrors getting hydrated each time we add patch