UPDATE -- see edit 3 below. This works fine on a d...
# prefect-community
UPDATE -- see edit 3 below. This works fine on a dedicated linux computer. This problem seems to be specific to Windows (maybe just Windows 11), regardless of the combination of agent running in WSL2/Powershell, docker WSL2 backend/Hyper-V. Prefect 2.0 is quite fun to use so far. One issue that I'm running into is with "auto remove" in the Docker Container block. Since Prefect 1.0 behavior is that the container is removed after the flow run, my assumption is that it made sense to set auto remove to True in Prefect 2.0 as well (otherwise containers start to pile up). When I run a flow using the default "auto remove"=False, the flow completes successfully in Cloud 2.0, the agent resumes waiting for the future runs, and the stopped container persists for the Docker Engine instance. But if I change "auto remove"=True: • the flow still completes successfully in Cloud 2.0 • but the agent completely crashes, stating it can't find the container marked for removal -- and stops listening for future runs • at the same time, the container is indeed successfully removed So, it's completing 2/3 steps successfully. It almost seems like the container is marked for removal, gets removed, and the agent tries to remove it again, or tries to verify that it was successfully removed but runs into an error when it doesn't find it rather than seeing that as successful. If this is a bug it wouldn't be quite as much of an issue if the agent continued running after the error message. Attached is the logout for the error message that appears after it logs all tasks completed. EDIT: I should add: This is using WSL2 Ubuntu in Windows 11. Docker Engine is running WSL2 backend. I get the same error if I run the agent from Powershell in Windows 11 and if I run the agent in a separate WSL2 Ubuntu instance. Both see the Docker Engine just fine, and run the flow in a container just fine, but also both crash with the output in the attached log above. EDIT 2: I tried changing Docker Desktop on windows to use Hyper-V rather than WSL2, and ran the agent in Powershell so it's all in the same environment. Got pretty much the exact same error message. Later I will try the agent and docker with "auto remove" on a dedicated linux machine. EDIT 3: This works fine on a dedicated linux machine (Ubuntu 22.04, docker pulling from ghcr.io, flow pulled from S3, successfully completed, successfully removed container, agent continued running fine afterwards).
👀 1