Arsen Arutyunyan created AIRFLOW-5069:
-----------------------------------------
Summary: `airflow initdb` crashes when owner set to None
Key: AIRFLOW-5069
URL: https://issues.apache.org/jira/browse/AIRFLOW-5069
Project: Apache Airflow
Issue Type: Bug
Components: cli, database
Affects Versions: 1.10.3
Reporter: Arsen Arutyunyan
`airflow initdb` crashes when there is a dag in dag folder that has owner set
to None. It crashes with the following error:
{code:java}
Traceback (most recent call last):
File "/usr/local/bin/airflow", line 32, in <module>
args.func(args)
File "/usr/local/lib/python3.6/site-packages/airflow/bin/cli.py", line 1096, in
initdb
db.initdb(settings.RBAC)
File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 317, in
initdb
dag.sync_to_db()
File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 73, in
wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/airflow/models/__init__.py", line
4105, in sync_to_db
owner = self.owner
File "/usr/local/lib/python3.6/site-packages/airflow/models/__init__.py", line
3381, in owner
return ", ".join(list(set([t.owner for t in self.tasks])))
TypeError: sequence item 0: expected str instance, NoneType found{code}
This command which sole role is to initialize metadata database lies on the
critical path of any Airflow deployment. Having bad dag in dag folder should
not lead to the failure of this command.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)