GitHub user tirkarthi added a comment to the discussion: Dag Policy raising unusual AirflowClusterPolicyError
I can see below logs in the dag processor. It seems the schedule attribute is a frozen attribute that cannot be set. https://github.com/apache/airflow/blob/cdfddea9207154cec55d178381869c959a7def42/task-sdk/src/airflow/sdk/definitions/dag.py#L393 ```json tail -n 3 ~/airflow/logs/dag_processor/latest/example_dags/example_display_name.py.log | python -m json.tool --json-lines { "timestamp": "2025-08-19T14:18:25.123601Z", "level": "info", "event": "<DAG: example_display_name>", "chan": "stdout", "logger": "processor" } { "timestamp": "2025-08-19T14:18:25.114862", "level": "error", "event": "", "logger": "airflow.models.dagbag.DagBag", "error_detail": [ { "exc_type": "FrozenAttributeError", "exc_value": "", "exc_notes": [], "syntax_error": null, "is_cause": false, "frames": [ { "filename": "/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/models/dagbag.py", "lineno": 522, "name": "bag_dag" }, { "filename": "/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/settings.py", "lineno": 177, "name": "dag_policy" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/pluggy/_hooks.py", "lineno": 512, "name": "__call__" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/pluggy/_manager.py", "lineno": 120, "name": "_hookexec" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/pluggy/_callers.py", "lineno": 167, "name": "_multicall" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/pluggy/_callers.py", "lineno": 121, "name": "_multicall" }, { "filename": "/home/karthikeyan/airflow/config/airflow_local_settings.py", "lineno": 7, "name": "dag_policy" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/attr/_make.py", "lineno": 1167, "name": "__setattr__" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/attr/setters.py", "lineno": 35, "name": "frozen" } ], "is_group": false, "exceptions": [] } ] } { "timestamp": "2025-08-19T14:18:25.115501", "level": "error", "event": "Failed to bag_dag: /home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/example_dags/example_display_name.py", "logger": "airflow.models.dagbag.DagBag", "error_detail": [ { "exc_type": "AirflowClusterPolicyError", "exc_value": "", "exc_notes": [], "syntax_error": null, "is_cause": false, "frames": [ { "filename": "/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/models/dagbag.py", "lineno": 497, "name": "_process_modules" }, { "filename": "/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/models/dagbag.py", "lineno": 540, "name": "bag_dag" } ], "is_group": false, "exceptions": [] }, { "exc_type": "FrozenAttributeError", "exc_value": "", "exc_notes": [], "syntax_error": null, "is_cause": false, "frames": [ { "filename": "/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/models/dagbag.py", "lineno": 522, "name": "bag_dag" }, { "filename": "/home/karthikeyan/stuff/python/airflow/airflow-core/src/airflow/settings.py", "lineno": 177, "name": "dag_policy" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/pluggy/_hooks.py", "lineno": 512, "name": "__call__" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/pluggy/_manager.py", "lineno": 120, "name": "_hookexec" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/pluggy/_callers.py", "lineno": 167, "name": "_multicall" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/pluggy/_callers.py", "lineno": 121, "name": "_multicall" }, { "filename": "/home/karthikeyan/airflow/config/airflow_local_settings.py", "lineno": 7, "name": "dag_policy" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/attr/_make.py", "lineno": 1167, "name": "__setattr__" }, { "filename": "/home/karthikeyan/stuff/python/airflow/.venv/lib/python3.11/site-packages/attr/setters.py", "lineno": 35, "name": "frozen" } ], "is_group": false, "exceptions": [] } ] } ``` GitHub link: https://github.com/apache/airflow/discussions/54688#discussioncomment-14157290 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
