xinge_li
03/24/2021, 1:49 PMsqlalchemy.exc.ProgrammingError: (psycopg2.errors.DuplicateObject) type "job_state" already exists
[SQL: CREATE TYPE job_state AS ENUM ('IDLE', 'RUNNING', 'SUCCESS', 'FAIL', 'DEAD')]
(Background on this error at: <http://sqlalche.me/e/14/f405>)
Cannot upgrade the system database. It might be corrupted or was created before database migrations where introduced (v0.34.0)
(psycopg2.errors.UndefinedTable) relation "role" does not exist
LINE 2: FROM role
^
[SQL: SELECT role.id AS role_id, role.name AS role_name, role.description AS role_description
FROM role
WHERE role.name = %(name_1)s
LIMIT %(param_1)s]
[parameters: {'name_1': 'admin', 'param_1': 1}]
(Background on this error at: <http://sqlalche.me/e/14/f405>)
Any advice will be appreciated, thank you!douwe_maan
03/24/2021, 3:21 PMdouwe_maan
03/24/2021, 3:25 PMjob table was created already as well?douwe_maan
03/24/2021, 3:25 PMxinge_li
03/24/2021, 3:38 PMxinge_li
03/24/2021, 3:41 PMdouwe_maan
03/24/2021, 3:41 PMdouwe_maan
03/24/2021, 3:42 PMjob_state enum using DROP TYPE job_state; and try again?xinge_li
03/24/2021, 3:42 PMxinge_li
03/24/2021, 3:45 PMmeltano ui command works when I drop the type explicitly 👍douwe_maan
03/24/2021, 3:46 PMjob table exist now?xinge_li
03/24/2021, 3:46 PMdouwe_maan
03/24/2021, 3:47 PMjob_state type apparently already existed, or why the migration created it twice and failed on the second try, but at least we resolved itdouwe_maan
03/24/2021, 3:47 PMxinge_li
03/24/2021, 3:47 PMxinge_li
03/24/2021, 3:51 PMmeltano invoke airflow command?
alembic.util.exc.CommandError: Online migration expected to match one row when updating 'd2ae31099d61' to '0e2a74e0fc9f' in 'alembic_version'; 0 founddouwe_maan
03/24/2021, 3:54 PMmeltano --log-level=debug invoke ...douwe_maan
03/24/2021, 3:55 PMxinge_li
03/24/2021, 3:59 PMxinge_li
03/24/2021, 4:00 PMdouwe_maan
03/24/2021, 4:00 PMxinge_li
03/24/2021, 4:06 PMxinge_li
03/24/2021, 4:06 PMdouwe_maan
03/24/2021, 4:07 PMxinge_li
03/24/2021, 4:08 PMxinge_li
03/24/2021, 4:10 PMdouwe_maan
03/24/2021, 4:14 PMalembic.util.exc.CommandError: Online migration expected to match one row when updating error you just saw looks like it's coming from Airflow itself. I'm not sure why it's also having trouble migrating and creating the tablesdouwe_maan
03/24/2021, 4:14 PMalembic_version table?xinge_li
03/24/2021, 4:15 PMdouwe_maan
03/24/2021, 4:15 PMxinge_li
03/24/2021, 4:16 PM.env file AIRFLOW__CORE__SQL_ALCHEMY_SCHEMAxinge_li
03/24/2021, 4:16 PMdouwe_maan
03/24/2021, 4:16 PMdouwe_maan
03/24/2021, 4:17 PMversion_num indicates that Airflow managed to get to this migration: https://github.com/apache/airflow/blob/e423e3873f6752fd27f4361e56afca3b12f82d68/ai[…]/versions/82b7c48c147f_remove_can_read_permission_on_config_.pydouwe_maan
03/24/2021, 4:18 PMmeltano invoke airflow again, are you seeing the same alembic.util.exc.CommandError: Online migration expected to match one row when updating 'd2ae31099d61' to '0e2a74e0fc9f' in 'alembic_version'; 0 found error with the same version IDs?xinge_li
03/24/2021, 4:30 PMalembic.util.exc.CommandError: Online migration expected to match one row when updating '849da589634d' to '2c6edca13270' in 'alembic_version'; 0 foundxinge_li
03/24/2021, 4:31 PMxinge_li
03/24/2021, 4:31 PMal_whatmough
08/21/2021, 10:39 AMDROP TYPE job_state; seemed to fix the issue, but it'd be good to know what caused it 🙂douwe_maan
08/23/2021, 3:06 PMal_whatmough
08/23/2021, 11:53 PMxinge_li
08/24/2021, 7:03 PM