You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2019/07/30 12:36:00 UTC

[jira] [Commented] (AIRFLOW-5069) `airflow initdb` crashes when owner is set to None

    [ https://issues.apache.org/jira/browse/AIRFLOW-5069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16896085#comment-16896085 ] 

Ash Berlin-Taylor commented on AIRFLOW-5069:
--------------------------------------------

This should be fixed and handled, but I _think_ that {{initdb}} will carry on even though it has printed an error.

> `airflow initdb` crashes when owner is 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
>            Priority: Minor
>
> `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)