GitHub user yc0 closed a discussion: Cannot import the DAG file with _config
suffix.
### 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
python version : python 3.12
### 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)
GitHub link: https://github.com/apache/airflow/discussions/43575
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]