Devin McCabe05/10/2021, 6:21 PM
? I'm trying the example flow from the tutorial:
I submit the flow using the "Quick Run" button in the UI and start a Docker agent:
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")
But the run forever stays in the pending state and I only ever see
prefect agent docker start --show-flow-logs --log-level DEBUG
in the agent logs. I've tried
Querying for flow runs / No flow runs found
as above and also using a custom image containing only this:
The UI shows it can reach my agent, though. Any ideas?
FROM python:3.8-buster RUN pip install prefect
Kevin Kho05/10/2021, 6:22 PM
Devin McCabe05/10/2021, 6:22 PM
Kevin Kho05/10/2021, 6:24 PM
Devin McCabe05/10/2021, 6:26 PM
That's my computer name. Where did that label come from?
python 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']
Kevin Kho05/10/2021, 6:27 PM
must match with
to pick up the Flow.
when you register.
labels = None
Devin McCabe05/10/2021, 6:36 PM
run prefect agent local 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.
run prefect agent docker start
Kevin Kho05/10/2021, 7:45 PM
is a label in itself also. This is something we’re thinking about.. You can use the
option for the local agent when spinning it up.