Dag Policy raising unusual AirflowClusterPolicyError #54688
Unanswered
devgonvarun
asked this question in
General
Replies: 3 comments
-
I can see below logs in the dag processor. It seems the schedule attribute is a frozen attribute that cannot be set. 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": []
}
]
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yep. Schedule cannot be modified. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Converted to a discusion. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Apache Airflow version
3.0.4
If "Other Airflow 2 version" selected, which one?
No response
What happened?
I am using 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 in my cluster policies.
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.
How to reproduce
Create a minimal dag_policy cluster policy
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?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions