You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/09/20 18:25:15 UTC
[GitHub] [airflow] mariotaddeucci opened a new issue, #26534: Can't override attributes on task_policy on 2.4
mariotaddeucci opened a new issue, #26534:
URL: https://github.com/apache/airflow/issues/26534
### Apache 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
- [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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dima-lyublin commented on issue #26534: Can't override attributes on task_policy on 2.4
Posted by GitBox <gi...@apache.org>.
dima-lyublin commented on issue #26534:
URL: https://github.com/apache/airflow/issues/26534#issuecomment-1301889362
I have a similar issue in Airflow 2.4.2:
```
def create_hooks(self):
self.s3_hook = S3Hook(aws_conn_id=self.s3_conn_id)
self.s3_hook.extra_args = {"ContentType": content_type}
```
```
ERROR - Task failed with exception
Traceback (most recent call last):
File "", line 57, in execute
self.s3_hook.extra_args = {"ContentType": content_type}
AttributeError: can't set attribute
```
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mariotaddeucci commented on issue #26534: Can't override attributes on task_policy on 2.4
Posted by GitBox <gi...@apache.org>.
mariotaddeucci commented on issue #26534:
URL: https://github.com/apache/airflow/issues/26534#issuecomment-1258921058
Yes, it's happing on 3.9. On 3.8 only with dynamic task.
It happens with both parameters, owners and on failure callback.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #26534: Can't override attributes on task_policy on 2.4
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #26534:
URL: https://github.com/apache/airflow/issues/26534#issuecomment-1296501639
Any news here @mariotaddeucci ? Is this problem still present?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk closed issue #26534: Can't override attributes on task_policy on 2.4
Posted by GitBox <gi...@apache.org>.
potiuk closed issue #26534: Can't override attributes on task_policy on 2.4
URL: https://github.com/apache/airflow/issues/26534
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #26534: Can't override attributes on task_policy on 2.4
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #26534:
URL: https://github.com/apache/airflow/issues/26534#issuecomment-1306353334
@dima-lyublin Please do not hijack this discussion- your problem is that you are trying to override property. DON'T do it. _extra_args is the field that is exposed by the property.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #26534: Can't override attributes on task_policy on 2.4
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #26534:
URL: https://github.com/apache/airflow/issues/26534#issuecomment-1306353479
@mariotaddeucci -> any news ?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #26534: Can't override attributes on task_policy on 2.4
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #26534:
URL: https://github.com/apache/airflow/issues/26534#issuecomment-1376826225
Duplicate of #24547. Fixed in #28313
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mariotaddeucci commented on issue #26534: Can't override attributes on task_policy on 2.4
Posted by GitBox <gi...@apache.org>.
mariotaddeucci commented on issue #26534:
URL: https://github.com/apache/airflow/issues/26534#issuecomment-1252771794
Works good with docker image apache/airflow:slim-2.4.0-python3.8
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #26534: Can't override attributes on task_policy on 2.4
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #26534:
URL: https://github.com/apache/airflow/issues/26534#issuecomment-1253824759
@mariotaddeucci - can you provide more information ? Is it happeniing on 3.9 too? Could you provide a more detailed stack trace? Is it when you set owner or on_failure_callback ?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org