uranusjr edited a comment on issue #19903:
URL: https://github.com/apache/airflow/issues/19903#issuecomment-1003874514


   I don’t recall any logic checking a function’s content, so this is very 
surprising. I can’t reproduce though; what’s a minimal example of this 
happening?
   
   This seems to work correctly for me:
   
   ```python
   import datetime
   
   from airflow.decorators import dag, task
   
   
   @dag(start_date=datetime.datetime(2022, 1, 1))
   def empty_task_dag():
       @task
       def empty_task():
           pass
   
       empty_task()
   
   
   dag = empty_task_dag()
   ```
   
   A task instance of DAG ID `empty_task_dag` and task ID `empty_task` is shown 
on the UI when I manually trigger a DAG run.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to