Michael-cd30 opened a new issue, #51563: URL: https://github.com/apache/airflow/issues/51563
### Apache Airflow version 3.0.1 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? A call to `DagRun.find()` throws the following RuntimeError : `Direct database access via the ORM is not allowed in Airflow 3.0` ### What you think should happen instead? According to the 3.0.1 [documentation](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/models/dagrun/index.html#airflow.models.dagrun.DagRun.find), this function should return the set of DAG runs that matches the search criteria. ### How to reproduce Run this DAG ``` from airflow.decorators import dag, task from airflow.models import DagRun from airflow.utils.state import DagRunState from datetime import datetime @dag(dag_id = "test_airflow3", start_date = datetime(2025, 1, 1), schedule = "@hourly", tags = ["misc"], catchup = False) def mon_dag(): @task(task_id = "appel_dagrun_find") def ma_premiere_tache(): print('DagRun.find(dag_id = "test_airflow3")') print(DagRun.find(dag_id = "test_airflow3")) ma_premiere_tache() mon_dag() ``` ### Operating System PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" ### Versions of Apache Airflow Providers apache-airflow-providers-amazon==9.7.0 apache-airflow-providers-celery==3.10.6 apache-airflow-providers-cncf-kubernetes==10.4.3 apache-airflow-providers-common-compat==1.6.1 apache-airflow-providers-common-io==1.5.4 apache-airflow-providers-common-messaging==1.0.1 apache-airflow-providers-common-sql==1.27.0 apache-airflow-providers-docker==4.3.1 apache-airflow-providers-elasticsearch==6.2.2 apache-airflow-providers-fab==2.0.2 apache-airflow-providers-ftp==3.12.3 apache-airflow-providers-git==0.0.2 apache-airflow-providers-google==15.1.0 apache-airflow-providers-grpc==3.7.3 apache-airflow-providers-hashicorp==4.1.1 apache-airflow-providers-http==5.2.2 apache-airflow-providers-microsoft-azure==12.3.1 apache-airflow-providers-mysql==6.2.2 apache-airflow-providers-odbc==4.9.2 apache-airflow-providers-openlineage==2.2.0 apache-airflow-providers-oracle==4.1.0 apache-airflow-providers-postgres==6.1.3 apache-airflow-providers-redis==4.0.2 apache-airflow-providers-sendgrid==4.0.1 apache-airflow-providers-sftp==5.2.1 apache-airflow-providers-slack==9.0.5 apache-airflow-providers-smtp==2.0.3 apache-airflow-providers-snowflake==6.3.0 apache-airflow-providers-ssh==4.0.1 apache-airflow-providers-standard==1.1.0 ### Deployment Docker-Compose ### Deployment details _No response_ ### Anything else? _No response_ ### Are you willing to submit PR? - [ ] 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: commits-unsubscr...@airflow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org