nailo2c opened a new pull request, #59347:
URL: https://github.com/apache/airflow/pull/59347
Closes #56545
# Why
When using an image without `root` permissions, the task fails with the
following error:
```console
mkdir: cannot create directory ‘/airflow’: Permission denied\n"
```
# How
Skip `mkdir` when `do_xcom_push` is set to `False`.
# What
The test DAG ran successfully on my local machine with a local k8s cluster.
Test DAG:
```python
from airflow.decorators import dag, task
from datetime import datetime
@dag(start_date=datetime(2024, 1, 1), schedule=None)
def test_dag():
@task.kubernetes(image="apache/airflow:3.1.0")
def example_task():
print("Hello from Airflow task")
example_task()
test_dag()
```
<img width="1913" height="994" alt="image"
src="https://github.com/user-attachments/assets/25f8de85-6781-4d22-a9ec-80ca83c519b2"
/>
--
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]