yc0 opened a new issue, #43537:
URL: https://github.com/apache/airflow/issues/43537
### Apache Airflow version
2.10.2
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
The DAG file name goes with ``_config.py``, and the DAG won't be imported.
For instance, the DAG is named xxxx_config.py, it won't be imported
successfully.
### What you think should happen instead?
_No response_
### How to reproduce
create a DAG, and name as wf_sample_config.py.
the context in wf_sample_config.py is as follows:
```python
from datetime import datetime
from airflow.decorators import task
from airflow import DAG
with DAG (
dag_id="a_testing_for_naming",
start_date=datetime(2024, 10, 31),
schedule=None
) as dag:
@task
def start(params = None, task=None, ti=None, dag_run=None):
pass
start()
```
You won't see the a_testing_for_naming DAG in your DAG view in the web UI.
How do you solve it?
just change the name with _cfg. For example, wf_sample_cfg.py. You can see
the DAG loaded successfully.
### Operating System
Debian GNU/Linux 11 (bullseye)
### Versions of Apache Airflow Providers
_No response_
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]