kacpermuda opened a new issue, #48928: URL: https://github.com/apache/airflow/issues/48928
### Apache Airflow version main (development) ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? While the task was running I've set it's state to success from the UI. It caused the task to fail with the following error: `RuntimeError: Direct database access via the ORM is not allowed in Airflow 3.0`. Full logs attached below. ### What you think should happen instead? I think the task should be marked as success and no error should be raised. ### How to reproduce 1. Run the below DAG 2. While the task is running, set it's state from the UI:  ``` import datetime as dt from airflow import DAG from airflow.providers.standard.operators.bash import BashOperator with DAG( dag_id="dag_success", start_date=dt.datetime(2024, 7, 3), schedule=None, ) as dag: task_success = BashOperator( task_id="task_success", bash_command="sleep 10 & exit 0;", ) ``` ### Operating System MacOS ### Versions of Apache Airflow Providers latest main ### Deployment Virtualenv installation ### Deployment details `breeze start-airflow -b postgres` ### Anything else? Task logs [task_logs.txt](https://github.com/user-attachments/files/19648195/task_logs.txt) Scheduler logs (not sure if even needed) [log_scheduler_20250408_112927.txt](https://github.com/user-attachments/files/19648178/log_scheduler_20250408_112927.txt) ### 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]
