Hi everyone, We are trying to schedule the pipelin...
# troubleshooting
z
Hi everyone, We are trying to schedule the pipelines through Airflow and containerize the app. But getting this error when this command runs
meltano invoke airflow scheduler
. We used PostgreSQL database for Meltano and Airflow. We tried to recreate database but it didn't help. Tried to reset database using commands
airflow resetdb
and
airflow db reset
with newer version of Airflow, but it raised an error which couldn't delete table due to some relationship between tables.
Copy code
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
alembic.script.revision.ResolutionError: No such revision or branch 'd135f52a6f49'
alembic.util.exc.CommandError: Can't locate revision identified by 'd135f52a6f49'
Airflow metadata database could not be initialized: `airflow initdb` failed
Does anyone know or have experienced this problem? Please can anyone help on this issue? How we can fix this? *the complete log below Cc: @conno_kuyt
```2022-03-07T113730.542380Z [info ] Context impl PostgresqlImpl. 2022-03-07T113730.542629Z [info ] Will assume transactional DDL. 2022-03-07T113730.559670Z [info ] Running upgrade -> b4c05e463b53, Create meltano.core base tables 2022-03-07T113730.589677Z [info ] Running upgrade b4c05e463b53 -> 6ef30ab7b8e5, Create meltano.api tables 2022-03-07T113730.654341Z [info ] Running upgrade 6ef30ab7b8e5 -> 53e97221d99f, Add run_id to Job 2022-03-07T113730.699451Z [info ] Running upgrade 53e97221d99f -> a3e2b0a4937d, add_login_audit_columns 2022-03-07T113730.705347Z [info ] Running upgrade a3e2b0a4937d -> 990c0665f3ce, ensure user.login_count default value 2022-03-07T113730.710162Z [info ] Running upgrade 990c0665f3ce -> ceb00d7ff3bd, Create the EmbedToken table 2022-03-07T113730.728436Z [info ] Running upgrade ceb00d7ff3bd -> 23ea52e6d784, add resource type to embed token 2022-03-07T113730.757730Z [info ] Running upgrade 23ea52e6d784 -> 87d9638f6ac6, Add Subscription 2022-03-07T113730.774528Z [info ] Running upgrade 87d9638f6ac6 -> 367228df6a43, Add 'trigger' to Job 2022-03-07T113730.779363Z [info ] Running upgrade 367228df6a43 -> e4fbabc3fed6, add last activity at column 2022-03-07T113730.783400Z [info ] Running upgrade e4fbabc3fed6 -> d135f52a6f49, Add
last_heartbeat_at
column to
job
table. 2022-03-07T113739.048117Z [error ] INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. Traceback (most recent call last): File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/alembic/script/base.py", line 162, in _catch_revision_errors yield File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/alembic/script/base.py", line 364, in _upgrade_revs revs = list(revs) File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/alembic/script/revision.py", line 765, in _iterate_revisions requested_lowers = self.get_revisions(lower) File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/alembic/script/revision.py", line 319, in get_revisions return sum([self.get_revisions(id_elem) for id_elem in id_], ()) File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/alembic/script/revision.py", line 319, in <listcomp> return sum([self.get_revisions(id_elem) for id_elem in id_], ()) File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/alembic/script/revision.py", line 322, in get_revisions return tuple( File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/alembic/script/revision.py", line 323, in <genexpr> self._revision_for_ident(rev_id, branch_label) File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/alembic/script/revision.py", line 386, in _revision_for_ident raise ResolutionError( alembic.script.revision.ResolutionError: No such revision or branch 'd135f52a6f49' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/projects/.meltano/orchestrators/airflow/venv/bin/airflow", line 37, in <module> args.func(args) File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/bin/cli.py", line 1453, in initdb db.initdb(settings.RBAC) File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/utils/db.py", line 323, in initdb upgradedb() File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/airflow/utils/db.py", line 386, in upgradedb command.upgrade(config, 'heads') File "/projects/.meltano/orchestrators/airflow/venv/lib/python3.8/site-packages/alembic/command.py", line 298, in upgrade script.run_env() File "/projects/.meltano/orch…
creating separate 2 database for Meltano and Airflow solved the problem