You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jack (JIRA)" <ji...@apache.org> on 2019/04/11 13:54:00 UTC

[jira] [Commented] (AIRFLOW-625) doc_md in concepts document seems wrong

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

jack commented on AIRFLOW-625:
------------------------------

Can't reproduce. Works fine for me. 

> 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: 1.7.1
>         Environment: CentOS 7.2 
>            Reporter: Flex Gao
>            Priority: Major
>
> 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}
> #!/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
(v7.6.3#76005)