Upgrading 0.2 to 0.21

Hello I upgraded my test server and I get those errors: Anything to do to correct that?
16 Replies
greg [iero]
greg [iero]OP5mo ago
And in BD side:
greg [iero]
greg [iero]OP5mo ago
Complete logs (server side):
Rob
Rob5mo ago
Unsure if this is related, but I am getting errors to do with the google mail/calendar sync after upgrading.
[
QueryFailedError: column messageChannel.contactAutoCreationPolicy does not exist
at PostgresQueryRunner.query (/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SelectQueryBuilder.loadRawResults (/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2192:25)
at async SelectQueryBuilder.executeEntitiesAndRawResults (/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2040:26)
at async SelectQueryBuilder.getRawAndEntities (/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:684:29)
at async SelectQueryBuilder.getMany (/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:750:25)
at async WorkspaceRepository.findBy (/app/packages/twenty-server/dist/src/engine/twenty-orm/repository/workspace.repository.js:33:24)
at async ConnectedAccountDeleteOnePreQueryHook.execute (/app/packages/twenty-server/dist/src/modules/connected-account/query-hooks/connected-account/connected-account-delete-one.pre-query.hook.js:33:33)
at async WorkspaceQueryHookExplorer.handleHook (/app/packages/twenty-server/dist/src/engine/api/graphql/workspace-query-runner/workspace-query-hook/workspace-query-hook.explorer.js:58:13)
at async WorkspaceQueryHookService.executePreQueryHooks (/app/packages/twenty-server/dist/src/engine/api/graphql/workspace-query-runner/workspace-query-hook/workspace-query-hook.service.js:31:13) {
path: [ 'deleteConnectedAccount' ],
locations: [ [Object] ],
extensions: [Object: null prototype] {}
}
]
[
QueryFailedError: column messageChannel.contactAutoCreationPolicy does not exist
at PostgresQueryRunner.query (/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SelectQueryBuilder.loadRawResults (/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2192:25)
at async SelectQueryBuilder.executeEntitiesAndRawResults (/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:2040:26)
at async SelectQueryBuilder.getRawAndEntities (/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:684:29)
at async SelectQueryBuilder.getMany (/app/node_modules/typeorm/query-builder/SelectQueryBuilder.js:750:25)
at async WorkspaceRepository.findBy (/app/packages/twenty-server/dist/src/engine/twenty-orm/repository/workspace.repository.js:33:24)
at async ConnectedAccountDeleteOnePreQueryHook.execute (/app/packages/twenty-server/dist/src/modules/connected-account/query-hooks/connected-account/connected-account-delete-one.pre-query.hook.js:33:33)
at async WorkspaceQueryHookExplorer.handleHook (/app/packages/twenty-server/dist/src/engine/api/graphql/workspace-query-runner/workspace-query-hook/workspace-query-hook.explorer.js:58:13)
at async WorkspaceQueryHookService.executePreQueryHooks (/app/packages/twenty-server/dist/src/engine/api/graphql/workspace-query-runner/workspace-query-hook/workspace-query-hook.service.js:31:13) {
path: [ 'deleteConnectedAccount' ],
locations: [ [Object] ],
extensions: [Object: null prototype] {}
}
]
`
aficio
aficio5mo ago
at least the gmail part is related to #6189 and #6188 issues on github oh it seems like you were the one that raised the issue 😄 or at least the username is similar
greg [iero]
greg [iero]OP5mo ago
@charles Any command to sort this?
charles
charles5mo ago
Hi! So whenever we upgrade from a version to the next one, there is 3 things to do: - yarn database:migrate:prod (core + metadata schema migration) - yarn command:prod workspace:sync-metadata -w {myWorkspaceId} (workspace schema migration - any command that is containing the version number (we are still working on a clear way to identify them). For 0.20 to 0.21 there is no such command to execute
greg [iero]
greg [iero]OP5mo ago
Thanks @charles ! Why those commands could not be launched automaticaly when we update? For the first command, it seems good:
/app/packages/twenty-server $ yarn database:migrate:prod
query: SELECT * FROM current_schema()
query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
query: SELECT version();
query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'metadata' AND "table_name" = '_typeorm_migrations'
query: SELECT * FROM "metadata"."_typeorm_migrations" "_typeorm_migrations" ORDER BY "id" DESC
No migrations are pending
query: SELECT * FROM current_schema()
query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
query: SELECT version();
query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'core' AND "table_name" = '_typeorm_migrations'
query: SELECT * FROM "core"."_typeorm_migrations" "_typeorm_migrations" ORDER BY "id" DESC
No migrations are pending
/app/packages/twenty-server $ yarn database:migrate:prod
query: SELECT * FROM current_schema()
query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
query: SELECT version();
query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'metadata' AND "table_name" = '_typeorm_migrations'
query: SELECT * FROM "metadata"."_typeorm_migrations" "_typeorm_migrations" ORDER BY "id" DESC
No migrations are pending
query: SELECT * FROM current_schema()
query: CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
query: SELECT version();
query: SELECT * FROM "information_schema"."tables" WHERE "table_schema" = 'core' AND "table_name" = '_typeorm_migrations'
query: SELECT * FROM "core"."_typeorm_migrations" "_typeorm_migrations" ORDER BY "id" DESC
No migrations are pending
For the second one, I just have a warning:
greg [iero]
greg [iero]OP5mo ago
If I restart the container just after, I get the same errors
charles
charles5mo ago
Command execution looks good We don't want to launch these commands automatically for now as they could result in data destruction. We will work on a migration UI soon. Kind of an admin panel for Twenty that will smooth a lot the self hosting what error are you facing? have you relaunched your server? it should be good :p
greg [iero]
greg [iero]OP5mo ago
@charles Ok I get it, I will launch the commands in test env and after in prod 🙂 I have those errors when I restart the server:
greg [iero]
greg [iero]OP5mo ago
I don't use S3, firebase and others, so I don't think it's bad but I don't know
thilles
thilles5mo ago
I upgraded ok 0.20.0 -> 0.21.2 with commands yarn database:migrate:prod yarn command:prod workspace:sync-metadata -w 26557ae2-33cc-4d38-8646-3b6f1031bd2b -f (notice -f flag) Only got the two normal warnings during sync [Nest] 248 - 07/11/2024, 6:45:44 AM WARN [SyncWorkspaceMetadataCommand] Workspace contains 2 issues, sync has been forced.
thilles
thilles5mo ago
Although in the UI it says 0.21.0 still
No description
charles
charles5mo ago
You are all good! the v0.21.2 is missing the patch number in the UI indeed!
greg [iero]
greg [iero]OP5mo ago
@charles I don't see any specific error when I navigate after the upgrade. Only those above when I start the container I have this error, don't know if related:
2024-07-11 14:28:46 [Nest] 1 - 07/11/2024, 12:28:46 PM ERROR [SyncDriver] No handler found for job: webhook-queue
2024-07-11 14:29:38 [Nest] 1 - 07/11/2024, 12:29:38 PM ERROR [SyncDriver] No handler found for job: webhook-queue
2024-07-11 14:29:38 [Nest] 1 - 07/11/2024, 12:29:38 PM ERROR [SyncDriver] No handler found for job: entity-events-to-db-queue
2024-07-11 14:29:38 [Nest] 1 - 07/11/2024, 12:29:38 PM ERROR [SyncDriver] No handler found for job: entity-events-to-db-queue
2024-07-11 14:29:45 [Nest] 1 - 07/11/2024, 12:29:45 PM ERROR [SyncDriver] No handler found for job: webhook-queue
2024-07-11 14:29:45 [Nest] 1 - 07/11/2024, 12:29:45 PM ERROR [SyncDriver] No handler found for job: entity-events-to-db-queue
2024-07-11 14:29:45 [Nest] 1 - 07/11/2024, 12:29:45 PM ERROR [SyncDriver] No handler found for job: entity-events-to-db-queue
2024-07-11 14:28:46 [Nest] 1 - 07/11/2024, 12:28:46 PM ERROR [SyncDriver] No handler found for job: webhook-queue
2024-07-11 14:29:38 [Nest] 1 - 07/11/2024, 12:29:38 PM ERROR [SyncDriver] No handler found for job: webhook-queue
2024-07-11 14:29:38 [Nest] 1 - 07/11/2024, 12:29:38 PM ERROR [SyncDriver] No handler found for job: entity-events-to-db-queue
2024-07-11 14:29:38 [Nest] 1 - 07/11/2024, 12:29:38 PM ERROR [SyncDriver] No handler found for job: entity-events-to-db-queue
2024-07-11 14:29:45 [Nest] 1 - 07/11/2024, 12:29:45 PM ERROR [SyncDriver] No handler found for job: webhook-queue
2024-07-11 14:29:45 [Nest] 1 - 07/11/2024, 12:29:45 PM ERROR [SyncDriver] No handler found for job: entity-events-to-db-queue
2024-07-11 14:29:45 [Nest] 1 - 07/11/2024, 12:29:45 PM ERROR [SyncDriver] No handler found for job: entity-events-to-db-queue
charles
charles5mo ago
this is because you are using the sync driver to process queue jobs (MESSAGE_QUEUE_TYPE). In order to use the worker, you can use pg-boss or bull-mq instead 🙂 if you are familiar with redis you can set it to bull-mq and add redis_host and redis_port in env variable (MESSAGE_QUEUE_TYPE is also configurable through env variable) https://twenty.com/developers/section/self-hosting/self-hosting-var
Want results from more Discord servers?
Add your server