[
https://issues.apache.org/jira/browse/AIRFLOW-7042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jarek Potiuk reassigned AIRFLOW-7042:
-------------------------------------
Assignee: Jarek Potiuk
> Example causes migration scripts to show errors
> -----------------------------------------------
>
> Key: AIRFLOW-7042
> URL: https://issues.apache.org/jira/browse/AIRFLOW-7042
> Project: Apache Airflow
> Issue Type: Bug
> Components: database
> Affects Versions: 1.10.9
> Reporter: Jarek Potiuk
> Assignee: Jarek Potiuk
> Priority: Major
>
> When trying to install fresh db you get this (harmless) error by default
> (with load_defaults=True).
>
> This should be fixed as it is misleading for the users.
>
> INFO [alembic.runtime.migration] Running upgrade 127d2bf2dfa7 ->
> cc1e65623dc7, add max tries column to task instance
> ERROR [airflow.models.dagbag.DagBag] Failed to import:
> /usr/local/lib/python3.6/site-packages/airflow/example_dags/example_subdag_operator.py
> Traceback (most recent call last):
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py",
> line 1246, in _execute_context
> cursor, statement, parameters, context
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py",
> line 588, in do_execute
> cursor.execute(statement, parameters)
> psycopg2.errors.UndefinedTable: relation "slot_pool" does not exist
> LINE 2: FROM slot_pool
> ^
> The above exception was the direct cause of the following exception:
> Traceback (most recent call last):
> File "/usr/local/lib/python3.6/site-packages/airflow/models/dagbag.py", line
> 204, in process_file
> m = imp.load_source(mod_name, filepath)
> File "/usr/local/lib/python3.6/imp.py", line 172, in load_source
> module = _load(spec)
> File "<frozen importlib._bootstrap>", line 684, in _load
> File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
> File "<frozen importlib._bootstrap_external>", line 678, in exec_module
> File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
> File
> "/usr/local/lib/python3.6/site-packages/airflow/example_dags/example_subdag_operator.py",
> line 47, in <module>
> dag=dag,
> File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 74,
> in wrapper
> return func(*args, **kwargs)
> File "/usr/local/lib/python3.6/site-packages/airflow/utils/decorators.py",
> line 98, in wrapper
> result = func(*args, **kwargs)
> File
> "/usr/local/lib/python3.6/site-packages/airflow/operators/subdag_operator.py",
> line 77, in __init__
> .filter(Pool.pool == self.pool)
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line
> 3287, in first
> ret = list(self[0:1])
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line
> 3065, in __getitem__
> return list(res)
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line
> 3389, in __iter__
> return self._execute_and_instances(context)
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line
> 3414, in _execute_and_instances
> result = conn.execute(querycontext.statement, self._params)
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py",
> line 982, in execute
> return meth(self, multiparams, params)
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/sql/elements.py",
> line 293, in _execute_on_connection
> return connection._execute_clauseelement(self, multiparams, params)
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py",
> line 1101, in _execute_clauseelement
> distilled_params,
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py",
> line 1250, in _execute_context
> e, statement, parameters, cursor, context
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py",
> line 1476, in _handle_dbapi_exception
> util.raise_from_cause(sqlalchemy_exception, exc_info)
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py",
> line 398, in raise_from_cause
> reraise(type(exception), exception, tb=exc_tb, cause=cause)
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py",
> line 152, in reraise
> raise value.with_traceback(tb)
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py",
> line 1246, in _execute_context
> cursor, statement, parameters, context
> File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py",
> line 588, in do_execute
> cursor.execute(statement, parameters)
> sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation
> "slot_pool" does not exist
> LINE 2: FROM slot_pool
> ^
> [SQL: SELECT slot_pool.id AS slot_pool_id, slot_pool.pool AS slot_pool_pool,
> slot_pool.slots AS slot_pool_slots, slot_pool.description AS
> slot_pool_description
> FROM slot_pool
> WHERE slot_pool.slots = %(slots_1)s AND slot_pool.pool = %(pool_1)s
> LIMIT %(param_1)s]
> [parameters: \{'slots_1': 1, 'pool_1': 'default_pool', 'param_1': 1}]
> (Background on this error at: http://sqlalche.me/e/f405)
> INFO [alembic.runtime.migration] Running upgrade cc1e65623dc7 ->
> bdaa763e6c56, Make xcom value column a large binary
--
This message was sent by Atlassian Jira
(v8.3.4#803005)