[
https://issues.apache.org/jira/browse/AIRFLOW-1306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682876#comment-16682876
]
Iuliia Volkova commented on AIRFLOW-1306:
-----------------------------------------
[~MouradKarim] why do you think it's a bug? Did you read a doсs?
This info from doc:
Note
When searching for DAGs, Airflow will only consider files where the string
“airflow” and “DAG” both appear in the contents of the .py file.
https://airflow.apache.org/concepts.html
It's not a bug, it's declared behavior. [~ashb]
> Create Dag in a class and in a separate module
> -----------------------------------------------
>
> Key: AIRFLOW-1306
> URL: https://issues.apache.org/jira/browse/AIRFLOW-1306
> Project: Apache Airflow
> Issue Type: Bug
> Components: DAG
> Affects Versions: 2.0.0
> Reporter: Mourad Benabdelkerim
> Priority: Major
>
> I created a dag in a separate class and in a separate python-model.
> In my main_model, I instantiate the class, I call a method which creates and
> returns the dag.
> So when I run *airflow list_dags*, it won't return the dag.
> BUT when I added a comment that contains the word "DAG", the *airflow
> dag_lists* command returns the dag.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)