Devin McCabe
05/10/2021, 6:21 PMDockerAgent
? I'm trying the example flow from the tutorial:
from prefect import Flow
from prefect import task
from prefect.run_configs import DockerRun
@task
def add(x, y=1):
return x + y
with Flow("My first flow!", run_config=DockerRun()) as flow:
first_result = add(1, y=2)
second_result = add(x=first_result, y=100)
flow.register(project_name="test-project")
I submit the flow using the "Quick Run" button in the UI and start a Docker agent:
prefect agent docker start --show-flow-logs --log-level DEBUG
But the run forever stays in the pending state and I only ever see Querying for flow runs / No flow runs found
in the agent logs. I've tried DockerRun()
as above and also using a custom image containing only this:
FROM python:3.8-buster
RUN pip install prefect
The UI shows it can reach my agent, though. Any ideas?Kevin Kho
05/10/2021, 6:22 PMDevin McCabe
05/10/2021, 6:22 PMKevin Kho
05/10/2021, 6:24 PMNone
under labelsDevin McCabe
05/10/2021, 6:26 PMpython pipeline/test.py
Flow URL: <http://localhost:8080/default/flow/ca78b43a-4077-462e-9634-e4248cc7def8>
└── ID: 97fec098-4383-4a70-acd5-2133a1706e3b
└── Project: test-project
└── Labels: ['CA-dpm-hu']
That's my computer name. Where did that label come from?Kevin Kho
05/10/2021, 6:27 PMNone
must match with None
to pick up the Flow.labels = None
when you register.Devin McCabe
05/10/2021, 6:36 PMrun prefect agent local start
and run prefect agent docker start
would behave identically (aside from in the obvious way). The simplest possible LocalAgent+Flow example works only because the same magic label gets applied at both ends. Changing that recipe in a small way without reproducing that functionality breaks things. Kind of confusing.Kevin Kho
05/10/2021, 7:45 PMNone
is a label in itself also. This is something we’re thinking about.. You can use the --no-hostname-label
option for the local agent when spinning it up.