GitHub user devgonvarun created a discussion: Dag Policy raising unusual AirflowClusterPolicyError
### 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. The same thing in Airflow 2.10.5 used to work without any errors. ``` #Airflow 2.10.5 def dag_policy(dag: DAG): dag.schedule_interval = "@once" ``` ### 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) ``` # Airflow 3.0.4 def dag_policy(dag: DAG): dag.schedule = "@once" ``` ### 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) GitHub link: https://github.com/apache/airflow/discussions/54688 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
