Upgrade 0.22.1 to v0.23.0 issues
Following the guide I'm running
But during workspace-sync I receive:
if I then continue with next command I get:
27 Replies
The issues I'm facing are reproducible without any real data. I created https://github.com/twentyhq/twenty/issues/6578 with a reproducer
GitHub
Upgrade from 0.22.1 to 0.23.0 missing metadata for task Β· Issue #65...
Bug Description bash <(curl -sL https://git.new/20) change TAG to 0.22.1 docker compose up login to app and create a task and opportunity docker compose down change tag to 0.23.0 docker compose ...
cc @Weiko
@π
Ήπ
°ππ
±π
΄π
΄ do you still need help? I see this issue as solved
I have not marked it solved on purpose at least
It seems to be a general bug because if I start from scratch it reproduces
Alright removing the tag and leaving it to @Weiko. He has more context on this upgrade
Unknown Userβ’3mo ago
Message Not Public
Sign In & Join Server To View
Yes that is the issue i created once I realized I could reproduce it cleanly without any real data
I get a similar error. Except instead of task, itβs failing on βnoteβ
Ok I can reproduce, having a look today. Thanks for the detailed description π
@π
Ήπ
°ππ
±π
΄π
΄ can you run
yarn command:prod upgrade-0.23
before yarn command:prod workspace:sync-metadata
I think the order is wrong in our doc. A sync-metadata is actually included in the upgrade-0.23 for that reason, because in this case the order matter
The first error you have is due to the fact that it's trying to sync and auto fix a link field but it should have been migrated to the new links field type before because link field are not supproted after 0.23. This is why you need to run the command upgrade-0.23 first@Weiko I've left work but I will get back to you tomorrow. I do believe there was issues in that order as well but not necessarily the same ones. Does it work when you do it according to my steps in issue report?
It does yes. I can't reproduce the error you have with upgrade-0.23 but at least it explains why sync-metadata fails if you run it first. So now we need to understand why upgrade-0.23 does not work for existing workspaces. It did with a fresh workspace.
If we look at the error, it tells you it can't move data from activity table to task table (that's part of. the upgarde) because the task table does not exist yet, hence why we included a sync-metadata in between operations that are executed during the upgrade
If I start from empty docker compose 0.22.1, create user, create workspace, create task with company+person relationship, create oppurtunity, then stop, change to 0.23, start and run migrate prod it works without any errors from what I can see
but when I run
Log
Trying now with v0.23.1 instead of v0.23.0 I can atleast run it on my reproducer. There are a lot of issues left on the workspace though - not something I would expect on database created and upgraded only one version.
Workspace health log
Nvm if I have a task it still fails (forgot to create the task in the empty workspace)
@Weiko are you able to reproduce the issue with upgrade from database created in 0.22.1->0.23.x ? If so is that something that will be corrected or should we look into trying to upgrade and manually fix the data?
I won't be available for the next 3 days and won't be able to push a fix unfortunately. I'll let @thomast or @charles see if a patch can be pushed or if we can provide a manual action (SQL query to fix your workspace) for you
I'm back @π
Ήπ
°ππ
±π
΄π
΄, on v0.23.1 i have a typescript issue. I'll fix it (we are also releasing a nice performance update), make it v0.23.2 and see if I face the same inconsistencies while 0.22.1->0.23.x
it's likely though
@charles It's seems like a general issue since I can recreate it without our data by creating a workspace in 0.22.x and adding a task to it and then trying to upgrade to 0.23.x
I haven't forgot, planning on pushing a patch tonight
I can reproduce the issue, working on a patch
My colleague @koenig will likely be taking over since I am no longer with the company that was using twenty. Thank you for amazing help @charles and if I ever find another use for twenty you are sure to hear from me again! Great piece of software!
@π
Ήπ
°ππ
±π
΄π
΄ it was very nice discussing with you, I'll hope you seeing you back at some point, wishing you the best !
@charles my upgrade to v0.23.2 from v0.22.1 is failing with the following error
I ran
yarn database:migrate:prod
and then yarn command:prod upgrade-0.23
. I also tried with yarn command:prod workspace:sync-metadata -f
in the middle
Do you have any suggestions to fix this? THANKS!Hi Rob, would you be available today for a quick call?
Thanks @charles , just DMβd you some times.
Investigated with Rob, turns out that a custom field was not having isCustom: true in fieldMetadata table