Open lbestatlas opened 3 months ago
Our proposed fix is to:
Hi, I meet the similar issue when I upgrade from v3.18.0 to v3.21.5 It seems that conductor oss detect the v3.18.0 db schema version is 12 and need do db migration. Then db migration from v12 to v13 failed.
7831 [main] INFO org.flywaydb.core.internal.command.DbValidate [] - Successfully validated 13 migrations (execution time 00:00.060s) 7857 [main] INFO org.flywaydb.core.internal.command.DbMigrate [] - Current version of schema "public": 12 7857 [main] WARN org.flywaydb.core.internal.command.DbMigrate [] - outOfOrder mode is active. Migration of schema "public" may not be reproducible. 7880 [main] INFO org.flywaydb.core.internal.command.DbMigrate [] - Migrating schema "public" to version "13 - workflow index columns" 8703 [main] ERROR org.flywaydb.core.internal.command.DbMigrate [] - Migration of schema "public" to version "13 - workflow index columns" failed! Changes successfully rolled back. 8713 [main] WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext [] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'taskResource' defined in URL [jar:nested:/app/libs/conductor-server.jar/!BOOT-INF/lib/conductor-rest.jar!/com/netflix/conductor/rest/controllers/TaskResource.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'taskServiceImpl' defined in URL [jar:nested:/app/libs/conductor-server.jar/!BOOT-INF/lib/conductor-core.jar!/com/netflix/conductor/service/TaskServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'executionService' defined in URL [jar:nested:/app/libs/conductor-server.jar/!BOOT-INF/lib/conductor-core.jar!/com/netflix/conductor/service/ExecutionService.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'workflowExecutorOps' defined in URL [jar:nested:/app/libs/conductor-server.jar/!BOOT-INF/lib/conductor-core.jar!/com/netflix/conductor/core/execution/WorkflowExecutorOps.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'deciderService' defined in URL [jar:nested:/app/libs/conductor-server.jar/!BOOT-INF/lib/conductor-core.jar!/com/netflix/conductor/core/execution/DeciderService.class]: Unsatisfied dependency expressed through constructor parameter 2: Error creating bean with name 'flywayForPrimaryDb' defined in class path resource [com/netflix/conductor/postgres/config/PostgresConfiguration.class]: Migration V13__workflow_index_columns.sql failed
SQL State : 23502 Error Code : 0 Message : ERROR: column "update_time" of relation "workflow_index" contains null values Location : db/migration_postgres/V13__workflow_index_columns.sql (/app/libs/nested:/app/libs/conductor-server.jar/!BOOT-INF/lib/conductor-postgres-persistence.jar!/db/migration_postgres/V13__workflow_index_columns.sql) Line : 7 Statement : ALTER TABLE workflow_index ALTER COLUMN update_time SET NOT NULL
8714 [main] INFO com.zaxxer.hikari.HikariDataSource [] - HikariPool-1 - Shutdown initiated...
Found a workaround - we just query all workflows with NULL updateTime and all of them are in running state. We terminate each of the workflow so now they have updateTime. Now upgrade succeeds.
Describe the bug This bug has several aspects:
We detected these issues when upgrade our service running v3.20.0 to v3.21.3. We run conductor with the following relevant properties as per the defaults ConductorProperties.asyncIndexingEnabled = false PostgresProperties.onlyIndexOnStatusChange = false
Details Conductor version: 3.21.3 Persistence implementation: Postgres Queue implementation: dynomite Lock: redis Workflow definition: n/a Task definition: n/a Event handler definition: n/a
To Reproduce Run the flyway upgrade with running workflows
Expected behavior The upgrade succeeds and no errors occur during the rollout where new and old versions are executing workflows
Screenshots If applicable, add screenshots to help explain your problem.
Additional context This is an examples of the error from the flyway upgrade