devgonvarun opened a new issue, #54663: URL: https://github.com/apache/airflow/issues/54663
### Apache Airflow version 3.0.4 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? I am using [dag_policy](https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/cluster-policies.html#airflow.policies.dag_policy) for altering the schedule of my dags. But instead it leads to a dag import error with AirflowClusterPolicyError. I have not configured any [AirflowClusterPolicyViolation](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/exceptions/index.html#airflow.exceptions.AirflowClusterPolicyViolation) in my cluster policies. <img width="893" height="239" alt="Image" src="https://github.com/user-attachments/assets/8ccf3588-3eb5-4026-8349-2d523dc93486" /> ### What you think should happen instead? The dag schedule should be altered to my configured schedule in the dag_policy. ### How to reproduce Create a minimal dag_policy [cluster policy](https://airflow.apache.org/docs/apache-airflow/stable/administration-and-deployment/cluster-policies.html#cluster-policies) ``` def dag_policy(dag: DAG): dag.schedule = "@once" #Dev and Test instances only for experimentation and Prod for scheduling ``` ### Operating System Debian GNU/Linux 12 (bookworm) ### 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? - [ ] 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]
