T
Twenty5w ago
baon99

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?
12 Replies
Prastoin
Prastoin5w ago
On what twenty's version Are you pulling from dockerhub or building from scratch?
baon99
baon99OP5w ago
building from scratch. v.43
Prastoin
Prastoin5w ago
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
baon99
baon99OP5w ago
Thank! Adding APP_VERSION to env works.
Prastoin
Prastoin5w ago
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
soundworker2003
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.
baon99
baon99OP3w ago
If doing local setup then use APP_VERSION=0.43.0, check database if workspace version is updated
Prastoin
Prastoin3w ago
Please use 0.44 latest patch not 0 When working on docker images APP_VERSION is already computed in the env variable
soundworker2003
Thanks I updated from 0.42.0 to 0.43.0. Everything was ok during upgrading, except this error:
[Nest] 2722 - 04/06/2025, 2:00:12 PM LOG [WorkspaceDatasourceFactory] Creating workspace data source for workspace 4372600c-2555-46de-9af4-b7f44a0aa61e and metadata version 75
[Nest] 2722 - 04/06/2025, 2:00:13 PM LOG [AddTasksAssignedToMeViewCommand] Error in workspace 4372600c-2555-46de-9af4-b7f44a0aa61e.
[Nest] 2722 - 04/06/2025, 2:00:13 PM LOG [AddTasksAssignedToMeViewCommand] Command completed!
[Nest] 2722 - 04/06/2025, 2:00:12 PM LOG [WorkspaceDatasourceFactory] Creating workspace data source for workspace 4372600c-2555-46de-9af4-b7f44a0aa61e and metadata version 75
[Nest] 2722 - 04/06/2025, 2:00:13 PM LOG [AddTasksAssignedToMeViewCommand] Error in workspace 4372600c-2555-46de-9af4-b7f44a0aa61e.
[Nest] 2722 - 04/06/2025, 2:00:13 PM LOG [AddTasksAssignedToMeViewCommand] Command completed!
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
soundworker2003
I updated to 0.44. But can't find version number in Admin Panel. Either Env Variables or Health Status is clickable.
No description
baon99
baon99OP3w ago
Its in Core Tables -> workspace. I used DBeaver
soundworker2003
thanks

Did you find this page helpful?