You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Flex Gao (JIRA)" <ji...@apache.org> on 2016/11/14 11:47:58 UTC
[jira] [Created] (AIRFLOW-625) doc_md in concepts document seems
wrong
Flex Gao created AIRFLOW-625:
--------------------------------
Summary: doc_md in concepts document seems wrong
Key: AIRFLOW-625
URL: https://issues.apache.org/jira/browse/AIRFLOW-625
Project: Apache Airflow
Issue Type: Bug
Affects Versions: Airflow 1.7.1
Environment: CentOS 7.2
Reporter: Flex Gao
In [https://github.com/apache/incubator-airflow/blob/master/docs/concepts.rst] it said *doc_md* is an attribute of a task, but this will give an error on webserver *Graph* tab
Example Dag file:
{code:python}
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from datetime import datetime, timedelta
SCRIPTS_PATH = '/var/lib/airflow/scripts'
default_args = {
'depends_on_past': False,
'start_date': datetime(2016, 11, 9, 0, 55),
}
dag = DAG('elasticsearch', default_args=default_args, schedule_interval=timedelta(days=1))
t1 = BashOperator(
task_id='daily_index_delete',
bash_command='%s/es_clean.py' % SCRIPTS_PATH,
dag=dag)
t1.doc_md = """\
#### Task Documentation
Clean ES Indeices Every Day
"""
{code}
This will give a traceback:
*AttributeError: 'NoneType' object has no attribute 'strip'*
But if i changed *t1.doc_md* to *dag.doc_md*, everything is ok.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)