You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/19 08:10:24 UTC

[GitHub] [airflow] dre2004 opened a new issue #13761: Markdown from doc_md is not being rendered in ui

dre2004 opened a new issue #13761:
URL: https://github.com/apache/airflow/issues/13761


   **Apache Airflow version**: 1.10.14
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: docker
   - **OS** (e.g. from /etc/os-release): apache/airflow:1.10.14-python3.8
   - **Kernel** (e.g. `uname -a`): Linux host 5.4.0-62-generic #70-Ubuntu SMP Tue Jan 12 12:45:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
   - **Install tools**: Docker version 19.03.8, build afacb8b7f0
   - **Others**:
   
   **What happened**:
   I created a DAG and set the doc_md property on the object but it isn't being rendered in the UI.
   
   **What you expected to happen**:
   I expected the markdown to be rendered in the UI
   
   **How to reproduce it**:
   Created a new container using the `airflow:1.10.14`, I have tried the following images with the same results.
   
   -  airflow:1.10.14:image-python3.8
   -  airflow:1.10.14:image-python3.7
   -  airflow:1.10.12:image-python3.7
   -  airflow:1.10.12:image-python3.7
   
   ```
   dag_docs = """
   ## Pipeline
   
   #### Purpose
   This is a pipeline
   """
   
   dag = DAG(
       'etl-get_from_api',
       default_args=default_args,
       description='A simple dag',
       schedule_interval=timedelta(days=1),
   )
   dag.doc_md = dag_docs
   
   ```
   
   ![image](https://user-images.githubusercontent.com/29732449/105004686-6b77d680-5a88-11eb-9e34-c8dd38b3fd10.png)
   
   ![image](https://user-images.githubusercontent.com/29732449/105004748-7af71f80-5a88-11eb-811c-11bc6a351c71.png)
   
   I have also tried with using a doc-string to populate the doc_md as well as adding some text within the constructor.
   
   ```
   dag = DAG(
       'etl-get_from_api',
       default_args=default_args,
       description='A simple dag',
       schedule_interval=timedelta(days=1),
       doc_md = "some text"
   )
   ```
   All of the different permutations I've tried seem to have the same result. The only thing I can change is the description, that appears to show up correctly.
   
   **Anything else we need to know**:
   I have tried multiple browsers (Firefox and Chrome) and I have also done an inspect on from both the graph view and the tree view from within the dag but I can't find any of the text within the page at all.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-796696529


   cc @Dr-Denzy Can you test it and see if you can reproduce it with 2.0.1 please?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] bturi commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
bturi commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-811743930


   Hi @Dr-Denzy ,
   
   Following the snippet above, the DAG documentation gets rendered, however, the Task Instance documentation does not.
   
   **RBAC = true
   Airflow 2.0.1**
   
   The webserver logs do not show any error.
   
   Do you have any suggestions?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797569876


   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   default_args = {
       'owner': 'airflow',
       'start_date': days_ago(2)
   }
   dag_docs = """
   ## My Awesome DAG Name
   #### Purpose
   This DAG does awesome stuff!
   #### Outputs
   This cool data `pipeline` has the following outputs:
   - `output_1` 
   - `output_2` 
   #### Owner/Maintainer
   You can reach the maintainer on this email: 
   [maintainer@my-startup-example.io](mailto:maintainer@my-startup-example.io).
   """
   with DAG('doc_md_oss_2', default_args=default_args, description='OSS suggested DAG Doc Md',
            schedule_interval='@once', catchup=False) as dag:
       dag.doc_md = dag_docs
       t1 = BashOperator(
           task_id='print_date',
           bash_command='date',
       )
       t1.doc_md = """/
       ### Task 1 message.
       """
       t2 = BashOperator(
           task_id='sleep',
           depends_on_past=False,
           bash_command='sleep 5',
           retries=3,
       )
       t3 = BashOperator(
           task_id='greeting',
           bash_command='echo Hello World!',
       )
       t1 >> t2 >> t3


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797565475


   @YiiTing @dre2004 There are two ways to make your dag's `doc_md` display in UI. It follows Python's Docstring works. See this StackOverflow link: [https://stackoverflow.com/questions/33066383/print-doc-in-python-3-script/33066458#33066458](https://stackoverflow.com/questions/33066383/print-doc-in-python-3-script/33066458#33066458). 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] YiiTing commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
YiiTing commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797170563


   Here is test code and i could not display in the “Graph View” and “Task Details” pages 
   
   ```
   with DAG(
       dag_id='test',
       schedule_interval='0 0 * * *',
       start_date=datetime(2021, 3, 10),
       default_args=default_args,
       catchup=False
   ) as dag:
       """
       ### My great DAG
       """
       dag.doc_md = __doc__
   
       ssh = SSHOperator(
           task_id='test',
           ssh_conn_id='ssh_default',
           command=date,
           get_pty=True
       )
       ssh.doc_md = """\
       #Title"
       Here's a [url](www.airbnb.com)
       """
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-796936492


   I could not reproduce this issue in both Airflow 1.10.14 and 2.0.1. In both cases the doc was displayed as expected in the UI.
   @dre2004 are you still having this issue? If yes, I will need more details.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797568934


   """
   ## My Awesome DAG Name
   
   #### Purpose
   
   This DAG does awesome stuff!
   
   #### Outputs
   
   This cool data `pipeline` has the following outputs:
   
   - `output_1`
   - `output_2`
   
   #### Owner/Maintainer
   
   You can reach the maintainer on this email:
   [maintainer@my-startup-example.io](mailto:maintainer@my-startup-example.io).
   """
   
   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   
   default_args = {
       'owner': 'airflow',
       'start_date': days_ago(2)
   }
   
   with DAG('doc_md_oss_2', default_args=default_args, description='OSS suggested DAG Doc Md',
            schedule_interval='@once', catchup=False) as dag:
       dag.doc_md = __doc__
   
       t1 = BashOperator(
           task_id='print_date',
           bash_command='date',
       )
       t1.doc_md = """/
       ### Task 1 message.
       """
   
       t2 = BashOperator(
           task_id='sleep',
           depends_on_past=False,
           bash_command='sleep 5',
           retries=3,
       )
   
       t3 = BashOperator(
           task_id='greeting',
           bash_command='echo Hello World!',
       )
   
       t1 >> t2 >> t3


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797567254


   Style 1:
   `
   """
   ## My Awesome DAG Name
   
   #### Purpose
   
   This DAG does awesome stuff!
   
   #### Outputs
   
   This cool data `pipeline` has the following outputs:
   
   - `output_1`
   - `output_2`
   
   #### Owner/Maintainer
   
   You can reach the maintainer on this email:
   [maintainer@my-startup-example.io](mailto:maintainer@my-startup-example.io).
   """
   
   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   
   default_args = {
       'owner': 'airflow',
       'start_date': days_ago(2)
   }
   
   with DAG('doc_md_style_1', default_args=default_args, description='My Dag Doc Md',
            schedule_interval='@once', catchup=False) as dag:
       dag.doc_md = __doc__
   
       t1 = BashOperator(
           task_id='print_date',
           bash_command='date',
       )
       t1.doc_md = """/
       ### Task 1 message.
       """
   
       t2 = BashOperator(
           task_id='sleep',
           depends_on_past=False,
           bash_command='sleep 5',
           retries=3,
       )
   
       t3 = BashOperator(
           task_id='greeting',
           bash_command='echo Hello World!',
       )
   
       t1 >> t2 >> t3
   `


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797567764


   `"""
   ## My Awesome DAG Name
   
   #### Purpose
   
   This DAG does awesome stuff!
   
   #### Outputs
   
   This cool data `pipeline` has the following outputs:
   
   - `output_1`
   - `output_2`
   
   #### Owner/Maintainer
   
   You can reach the maintainer on this email:
   [maintainer@my-startup-example.io](mailto:maintainer@my-startup-example.io).
   """
   
   from airflow import DAG
   # from airflow.operators.bash_operator import BashOperator
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   
   default_args = {
       'owner': 'airflow',
       'start_date': days_ago(2)
   }
   
   with DAG('doc_md_oss_2', default_args=default_args, description='OSS suggested DAG Doc Md',
            schedule_interval='@once', catchup=False) as dag:
       dag.doc_md = __doc__
   
       t1 = BashOperator(
           task_id='print_date',
           bash_command='date',
       )
       t1.doc_md = """/
       ### Task 1 message.
       """
   
       t2 = BashOperator(
           task_id='sleep',
           depends_on_past=False,
           bash_command='sleep 5',
           retries=3,
       )
   
       t3 = BashOperator(
           task_id='greeting',
           bash_command='echo Hello World!',
       )
   
       t1 >> t2 >> t3
   `


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] KulykDmytro edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
KulykDmytro edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-827730237


   Reproduced on 1.10.15 running on k8s
   ![image](https://user-images.githubusercontent.com/34435869/116276090-d7a35e00-a78c-11eb-9738-f925116e1036.png)
   
   However fresh docker-compose build running on local docker showing both docs
   ![image](https://user-images.githubusercontent.com/34435869/116275840-a4f96580-a78c-11eb-8f0a-348d6774105a.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797569876


   ```python
   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   
   default_args = {
       'owner': 'airflow',
       'start_date': days_ago(2)
   }
   
   dag_docs = """
   ## My Awesome DAG Name
   #### Purpose
   This DAG does awesome stuff!
   #### Outputs
   This cool data `pipeline` has the following outputs:
   - `output_1` 
   - `output_2` 
   #### Owner/Maintainer
   You can reach the maintainer on this email: 
   [maintainer@my-startup-example.io](mailto:maintainer@my-startup-example.io).
   """
   
   with DAG('doc_md_style_2', default_args=default_args, description='Dag DocString',
            schedule_interval='@once', catchup=False) as dag:
       dag.doc_md = dag_docs
       t1 = BashOperator(
           task_id='print_date',
           bash_command='date',
       )
       t1.doc_md = """/
       ### Task 1 message.
       """
       t2 = BashOperator(
           task_id='sleep',
           depends_on_past=False,
           bash_command='sleep 5',
           retries=3,
       )
       t3 = BashOperator(
           task_id='greeting',
           bash_command='echo Hello World!',
       )
       t1 >> t2 >> t3
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] YiiTing edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
YiiTing edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797170563


   Here is test code and i could not display in the “Graph View” and “Task Details” pages 
   
   ```
   with DAG(
       dag_id='test',
       schedule_interval='0 0 * * *',
       start_date=datetime(2021, 3, 10),
       default_args=default_args,
       catchup=False
   ) as dag:
       """
       ### My great DAG
       """
       dag.doc_md = __doc__
   
       ssh = SSHOperator(
           task_id='test',
           ssh_conn_id='ssh_default',
           command='date',
           get_pty=True
       )
       ssh.doc_md = """\
       #Title"
       Here's a [url](www.airbnb.com)
       """
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797569876


   ```python
   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   
   default_args = {
       'owner': 'airflow',
       'start_date': days_ago(2)
   }
   
   dag_docs = """
   ## My Awesome DAG Name
   #### Purpose
   This DAG does awesome stuff!
   #### Outputs
   This cool data `pipeline` has the following outputs:
   - `output_1` 
   - `output_2` 
   #### Owner/Maintainer
   You can reach the maintainer on this email: 
   [maintainer@my-startup-example.io](mailto:maintainer@my-startup-example.io).
   """
   
   with DAG('doc_md_style_2', default_args=default_args, description='Dag DocString',
            schedule_interval='@once', catchup=False) as dag:
   
       dag.doc_md = dag_docs
   
       t1 = BashOperator(
           task_id='print_date',
           bash_command='date',
       )
       t1.doc_md = """/
       ### Task 1 message.
       """
       t2 = BashOperator(
           task_id='sleep',
           depends_on_past=False,
           bash_command='sleep 5',
           retries=3,
       )
       t3 = BashOperator(
           task_id='greeting',
           bash_command='echo Hello World!',
       )
       t1 >> t2 >> t3
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-764702327


   Can you test it out 2.0.0 too please and see if it works for you there?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797568934






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797565475


   @YiiTing @dre2004 There are two ways to make your dag's `doc_md` display in UI. It follows how Python's Docstring works. See this StackOverflow link: [https://stackoverflow.com/questions/33066383/print-doc-in-python-3-script/33066458#33066458](https://stackoverflow.com/questions/33066383/print-doc-in-python-3-script/33066458#33066458). 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] KulykDmytro edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
KulykDmytro edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-827772549






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-813077707


   @bturi I was able to reproduce it and will fix it in 2.0.2 as part of https://github.com/apache/airflow/issues/15178 -- thanks for reporting


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-796698024


   > cc @Dr-Denzy Can you test it and see if you can reproduce it with 2.0.1 and 1.10.14 please?
   
   I will take a look at it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] YiiTing commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
YiiTing commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-796606058


   doc_md is not working in Ver. 2.0.1


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy removed a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy removed a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797567764


   `"""
   ## My Awesome DAG Name
   
   #### Purpose
   
   This DAG does awesome stuff!
   
   #### Outputs
   
   This cool data `pipeline` has the following outputs:
   
   - `output_1`
   - `output_2`
   
   #### Owner/Maintainer
   
   You can reach the maintainer on this email:
   [maintainer@my-startup-example.io](mailto:maintainer@my-startup-example.io).
   """
   
   from airflow import DAG
   # from airflow.operators.bash_operator import BashOperator
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   
   default_args = {
       'owner': 'airflow',
       'start_date': days_ago(2)
   }
   
   with DAG('doc_md_oss_2', default_args=default_args, description='OSS suggested DAG Doc Md',
            schedule_interval='@once', catchup=False) as dag:
       dag.doc_md = __doc__
   
       t1 = BashOperator(
           task_id='print_date',
           bash_command='date',
       )
       t1.doc_md = """/
       ### Task 1 message.
       """
   
       t2 = BashOperator(
           task_id='sleep',
           depends_on_past=False,
           bash_command='sleep 5',
           retries=3,
       )
   
       t3 = BashOperator(
           task_id='greeting',
           bash_command='echo Hello World!',
       )
   
       t1 >> t2 >> t3
   `


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil closed issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
kaxil closed issue #13761:
URL: https://github.com/apache/airflow/issues/13761


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] AmarEL commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
AmarEL commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-762855230


   All the examples I saw and the way that it worked for me was defining a ``__doc__`` in the very beginning of the python file that contains my DAG code and passes the value for the ``doc_md`` property.
   
   ```
   """
   ### My Python  File __doc__ section in Markdown
   Hello World.
   """
   
   dag = DAG(dag_id=dag_id, schedule_interval=schedule_interval,
                 default_args=default_args)
   dag.doc_md = __doc__
   ```
   
   https://airflow.apache.org/docs/apache-airflow/stable/tutorial.html?highlight=doc_md#adding-dag-and-tasks-documentation


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797565475


   @YiiTing @dre2004 In this example below you will find ways to make your dag's `doc_md` display as expected in the Airflow UI. It follows how Python's Docstring works. See this StackOverflow link for more of Python Docstring: [https://stackoverflow.com/questions/33066383/print-doc-in-python-3-script/33066458#33066458](https://stackoverflow.com/questions/33066383/print-doc-in-python-3-script/33066458#33066458). 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy removed a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy removed a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797567254


   Style 1:
   `
   """
   ## My Awesome DAG Name
   
   #### Purpose
   
   This DAG does awesome stuff!
   
   #### Outputs
   
   This cool data `pipeline` has the following outputs:
   
   - `output_1`
   - `output_2`
   
   #### Owner/Maintainer
   
   You can reach the maintainer on this email:
   [maintainer@my-startup-example.io](mailto:maintainer@my-startup-example.io).
   """
   
   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   
   default_args = {
       'owner': 'airflow',
       'start_date': days_ago(2)
   }
   
   with DAG('doc_md_style_1', default_args=default_args, description='My Dag Doc Md',
            schedule_interval='@once', catchup=False) as dag:
       dag.doc_md = __doc__
   
       t1 = BashOperator(
           task_id='print_date',
           bash_command='date',
       )
       t1.doc_md = """/
       ### Task 1 message.
       """
   
       t2 = BashOperator(
           task_id='sleep',
           depends_on_past=False,
           bash_command='sleep 5',
           retries=3,
       )
   
       t3 = BashOperator(
           task_id='greeting',
           bash_command='echo Hello World!',
       )
   
       t1 >> t2 >> t3
   `


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-762674542


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] KulykDmytro commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
KulykDmytro commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-827772549


   just figured out:
   enabling of `STORE_SERIALIZED_DAGS` leads to this issue


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
kaxil edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-796696529


   cc @Dr-Denzy Can you test it and see if you can reproduce it with 2.0.1 and 1.10.14 please?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] KulykDmytro commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
KulykDmytro commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-827730237


   Reproduced on 1.10.15


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-764702327


   Can you test it out 2.0.0 too please and see if it works for you there?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797565475


   @YiiTing @dre2004 In this examples below you will find ways to make your dag's `doc_md` display as expected in the Airflow UI. It follows how Python's Docstring works. See this StackOverflow link for more on Python Docstring: [https://stackoverflow.com/questions/33066383/print-doc-in-python-3-script/33066458#33066458](https://stackoverflow.com/questions/33066383/print-doc-in-python-3-script/33066458#33066458). 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797566502


   Specifically `__doc__` shows the docstring of the Python Module


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] dre2004 commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
dre2004 commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-763188207


   Yes, I've also tried that to no avail.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-827838274


   @KulykDmytro Yup :) I have fixed it in https://github.com/apache/airflow/pull/15191 which is part of Airflow 2.0.2.
   
   For Airflow < 2 -- the workaround is to disable DAG Serialization


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797569876


   ```python
   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   
   default_args = {
       'owner': 'airflow',
       'start_date': days_ago(2)
   }
   
   dag_docs = """
   ## My Awesome DAG Name
   #### Purpose
   This DAG does awesome stuff!
   #### Outputs
   This cool data `pipeline` has the following outputs:
   - `output_1` 
   - `output_2` 
   #### Owner/Maintainer
   You can reach the maintainer on this email: 
   [maintainer@my-startup-example.io](mailto:maintainer@my-startup-example.io).
   """
   
   with DAG('doc_md_style_2', default_args=default_args, description='Dag DocString',
            schedule_interval='@once', catchup=False) as dag:
   
       dag.doc_md = dag_docs
   
       t1 = BashOperator(
           task_id='print_date',
           bash_command='date',
       )
   
       t1.doc_md = """/
       ### Task 1 message.
       """
   
       t2 = BashOperator(
           task_id='sleep',
           depends_on_past=False,
           bash_command='sleep 5',
           retries=3,
       )
   
       t3 = BashOperator(
           task_id='greeting',
           bash_command='echo Hello World!',
       )
   
       t1 >> t2 >> t3
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797568934


   ```python
   """
   ## My Awesome DAG Name
   
   #### Purpose
   
   This DAG does awesome stuff!
   
   #### Outputs
   
   This cool data `pipeline` has the following outputs:
   
   - `output_1`
   - `output_2`
   
   #### Owner/Maintainer
   
   You can reach the maintainer on this email:
   [maintainer@my-startup-example.io](mailto:maintainer@my-startup-example.io).
   """
   
   from airflow import DAG
   from airflow.operators.bash import BashOperator
   from airflow.utils.dates import days_ago
   
   default_args = {
       'owner': 'airflow',
       'start_date': days_ago(2)
   }
   
   with DAG('doc_md_oss_2', default_args=default_args, description='OSS suggested DAG Doc Md',
            schedule_interval='@once', catchup=False) as dag:
       dag.doc_md = __doc__
   
       t1 = BashOperator(
           task_id='print_date',
           bash_command='date',
       )
       t1.doc_md = """/
       ### Task 1 message.
       """
   
       t2 = BashOperator(
           task_id='sleep',
           depends_on_past=False,
           bash_command='sleep 5',
           retries=3,
       )
   
       t3 = BashOperator(
           task_id='greeting',
           bash_command='echo Hello World!',
       )
   
       t1 >> t2 >> t3
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] Dr-Denzy edited a comment on issue #13761: Markdown from doc_md is not being rendered in ui

Posted by GitBox <gi...@apache.org>.
Dr-Denzy edited a comment on issue #13761:
URL: https://github.com/apache/airflow/issues/13761#issuecomment-797565475


   @YiiTing @dre2004 In this examples below you will find ways to make your dag's `doc_md` display as expected in the Airflow UI. It follows how Python's Docstring works. See this StackOverflow link for more of Python Docstring: [https://stackoverflow.com/questions/33066383/print-doc-in-python-3-script/33066458#33066458](https://stackoverflow.com/questions/33066383/print-doc-in-python-3-script/33066458#33066458). 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org