-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executing a Docker Decorator task results in Jinja Error #26718
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
Yeah. I think the problem is that we have not released the docker provider before releasing 2.4.0/2.4.1. We will fix it. |
Sorry for that - I had not realised we had this implicit coupling. |
Hey @noah-gil - can you please inslall RC candidate of 3.2.0 docker provider and confirm that the problem is fixed ? https://pypi.org/project/apache-airflow-providers-docker/3.2.0rc1/ - you can also comment here :) #26752 |
Closing as the docker provider is in voting period. |
I can confirm that the problem is fixed for the RC version. Thanks for the quick response! |
Glad it worked :) |
Apache Airflow Provider(s)
docker
Versions of Apache Airflow Providers
apache-airflow-providers-docker==3.1.0
Apache Airflow version
2.4.0
Operating System
Debian GNU/Linux 11 (bullseye)
Deployment
Docker-Compose
Deployment details
Client: Docker Engine - Community
Cloud integration: v1.0.28
Version: 20.10.17
API version: 1.41
Go version: go1.17.11
Git commit: 100c701
Built: Mon Jun 6 23:03:17 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Docker Compose: v2.7.0
Using a slightly modified version of the example docker-compose.yaml:
What happened
I was trying to test running a task using the
@task.docker
decorator, so I set up the following DAG with a series of Docker tasks.In the past, I've had success with the DockerOperator, so I expected no difference. However, I received the following error in the output log:
What you think should happen instead
I expected the Docker tasks to run the code in the provided Python function.
How to reproduce
./dags
folderdocker_parallel_decorator
from the web UIAnything else
I have no experience with Jinja, so I don't know the specifics, but I noticed that I was able to create a workaround by patching the
/home/airflow/.local/lib/python3.7/site-packages/airflow/providers/docker/decorators/docker.py
file in theairflow-scheduler
service.First, I copied the file out of the container.
Then I changed the following snippet starting on line 101:
To this:
Then I copied the file back into the container.
After that, running the DAG resulted in no errors with the expected output in the logs.
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: