Workspace version and APP_VERSION

Can someone please explain the purpose of core.workspace.version and APP_VERSION, and how they impact the data migration process? @prastoin @charles @Guillaume
15 Replies
Prastoin
Prastoin3w ago
Hello, The APP_VERSION is a server env variable that contains the current twenty version of the application you're running The workspace.version contains the latest twenty version that upgraded that workspace successfully If a workspace version is not equal to the previous version than the upgrade is ignored and you need to downgrade to the corresponding version that can handle the upgrade You should never define or update manually both the workspace version and APP_VERSION ( unless you know why and what you do ) APP_VERSION is defined at the image build, so if you pull one of our image from dockerhub you're good to go If you build your custom image then you will have to manually define the correct APP_VERSION it needs to follow twenty's version to do not break upgrade lifecycle Let me know if you have any questions!
Guillaume
Guillaume3w ago
for @prastoin 🙂
Prastoin
Prastoin3w ago
About to add some official docs on that for anyone building their own images even though they would face explicit error while using the application
Jay Patel
Jay PatelOP3w ago
I’m currently using version 0.51.14 and attempting to upgrade to 0.52.11. However, I'm encountering an error stating that the workspace version is missing because core.workspace.version has no value.
Prastoin
Prastoin3w ago
Are you building your own Twenty docker image ? You shouldn't be able to migrate since 0.44.0 if your workspace does not have a version
Jay Patel
Jay PatelOP3w ago
We are using the packages/twenty-docker/twenty/Dockerfile from the codebase to build the image and create the container.
Prastoin
Prastoin3w ago
So yes you build your own custom image
Jay Patel
Jay PatelOP3w ago
No like that, We have took direct 51.0 verison of twenty.
Prastoin
Prastoin3w ago
Ok ! Then you need to define APP_VERSION=0.51.14 in your server container or pass it as an arg to your docker image build command Check the Dockerfile args, I'm on the phone right now will confirm in less than 30 mins
Jay Patel
Jay PatelOP3w ago
While migrating from version 0.51.14 to 0.52.11, if I set APP_VERSION = 0.51.14, what value should I assign to core.workspace.version?
Prastoin
Prastoin3w ago
When a workspace gets created it will be applied the current APP_VERSION, which means that if you created your workspace while using 0.51.14 ( should have been define but empty in your case ) You should manually define it at 0.51.14
Jay Patel
Jay PatelOP3w ago
@prastoin Seems like it's done, Just to reconfirm: we need to update the APP_VERSION before upgrading the Twenty version, and the APP_VERSION should match the version we are upgrading to.
Prastoin
Prastoin3w ago
Just to reconfirm: we need to update the APP_VERSION before upgrading the Twenty version, and the APP_VERSION should match the version we are upgrading to.
Exactly, you can double check a workspace migration is all right by looking directly your db for the workspace version post ugprade Will forward the docs addition in this thread during the day, for self hosters building their own images
Jay Patel
Jay PatelOP3w ago
Ok , Thank you @prastoin 👍
Prastoin
Prastoin3w ago
My pleasure ! enjoy coding !

Did you find this page helpful?