Can't override attributes on task_policy on 2.4
See original GitHub issueApache Airflow version
2.4.0
What happened
Task policies on airflow 2.4 are raising ERROR [airflow.models.dagbag.DagBag] can't set attribute
error on trying to override the values.
What you think should happen instead
No response
How to reproduce
Override an attribute using task_policy on config/airflow_local_settings.py using the docker image apache/airflow:slim-2.4.0-python3.10
def task_policy(task):
task.owner = "newowner"
task.on_failure_callback = lambda context: print(context)
Operating System
docker image apache/airflow:slim-2.4.0-python3.10
Versions of Apache Airflow Providers
No response
Deployment
Other Docker-based deployment
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
- I agree to follow this project’s Code of Conduct
Issue Analytics
- State:
- Created a year ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Unable to override chef-attributes
I am running the below command in powershell to perform chef operations. chef-client -o 'recipe[cookbook]' -j attributes-file.json. Contents of ...
Read more >Pass override attribute via command line for chef-solo
You can use the -j command line option in order to define attributes you may want to override the default ones.
Read more >Cluster Policies — Airflow Documentation
Any extra attributes set by a cluster policy take priority over those ... If you want to override the default operator settings, use...
Read more >5 Handling Information in Your Process Design
You can access these activity instance attributes in the same way you access regular data objects, but you cannot assign them new values....
Read more >numa_memory_policy.rst
If a task does not define a task policy, then all page allocations that ... However, unlike VMA policies, which can be considered...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have a similar issue in Airflow 2.4.2:
@mariotaddeucci -> any news ?