stephen-lazarionok opened a new issue, #39880:
URL: https://github.com/apache/airflow/issues/39880
### Apache Airflow version
Other Airflow 2 version (please specify below)
### If "Other Airflow 2 version" selected, which one?
2.5.0-python3.10
### What happened?
When trying to use dynamic task mapping with `KubernetesPodOperator` getting
the following:
```
Broken DAG: [/opt/airflow/dags/misc/mydag.py] Traceback (most recent call
last):
File
"/home/airflow/.local/lib/python3.10/site-packages/airflow/models/mappedoperator.py",
line 149, in __attrs_post_init__
validate_mapping_kwargs(self.operator_class, "partial", self.kwargs)
File
"/home/airflow/.local/lib/python3.10/site-packages/airflow/models/mappedoperator.py",
line 109, in validate_mapping_kwargs
raise TypeError(f"{op.__name__}.{func}() got {error}")
TypeError: KubernetesPodOperator.partial() got an unexpected keyword
argument 'provide_context'
```
### What you think should happen instead?
Everything should work
### How to reproduce
Try to use:
```
KubernetesPodOperator.partial(
namespace=NAMESPACE,
image=f"{REGISTRY_NAME}/{IMAGE_NAME}:{IMAGE_TAK}",
cmds=["python"],
arguments=["/src/pipelines/pipeline.py"],
name="abc",
task_id="abc",
get_logs=True,
is_delete_operator_pod=True,
dag=dag,
labels={
"job_type": JobType.ETL,
"platform": Platform.ALL_PLATFORMS,
"app": JOB_NAME,
},
container_resources=k8s.V1ResourceRequirements(
limits={"memory": "256Mi"}, requests={"cpu": "100m", "memory":
"256Mi"}
),
image_pull_secrets=[k8s.V1LocalObjectReference(IMAGE_PULL_SECRET_NAME)],
).expand(env_vars=[{"A": "A"}, {"A": "B"}])
```
### Operating System
Linux
### Versions of Apache Airflow Providers
```
apache-airflow-providers-cncf-kubernetes==7.8.0
apache-airflow-providers-amazon==6.2.0
apache-airflow-providers-slack==7.2.0
apache-airflow-providers-postgres==5.4.0
```
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [X] 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]