MasatoShima
08/13/2022, 1:38 PM--------
# Prefect orion start.
% prefect orion start
___ ___ ___ ___ ___ ___ _____ ___ ___ ___ ___ _ _
| _ \ _ \ __| __| __/ __|_ _| / _ \| _ \_ _/ _ \| \| |
| _/ / _|| _|| _| (__ | | | (_) | /| | (_) | .` |
|_| |_|_\___|_| |___\___| |_| \___/|_|_\___\___/|_|\_|
Configure Prefect to communicate with the server with:
prefect config set PREFECT_API_URL=<http://127.0.0.1:4200/api>
View the API reference documentation at <http://127.0.0.1:4200/docs>
Check out the dashboard at <http://127.0.0.1:4200>
INFO: Started server process [26251]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on <http://127.0.0.1:4200> (Press CTRL+C to quit)
...
--------
# Build deployment.
% poetry run prefect deployment build ./workflows/flow_hello.py:main_flow -n flow_hello -t test
Found flow 'flow_hello'
Deployment YAML created at '/********/********/********/********/main_flow-deployment.yaml'.
--------
# Set 'PREFECT_API_URL'.
% prefect config set PREFECT_API_URL=<http://127.0.0.1:4200/api>
Set 'PREFECT_API_URL' to '<http://127.0.0.1:4200/api>'.
Updated profile 'default'.
--------
# Apply deployment.
% prefect deployment apply main_flow-deployment.yaml
Successfully loaded 'flow_hello'
Deployment 'flow_hello/flow_hello' successfully created with id '04a098ba-b53b-4216-98a2-9c96b059104f'.
--------
# Start Prefect Orion Agent.
% prefect agent start -t test
Created work queue 'Agent queue test'
Starting agent connected to <http://127.0.0.1:4200/api>...
___ ___ ___ ___ ___ ___ _____ _ ___ ___ _ _ _____
| _ \ _ \ __| __| __/ __|_ _| /_\ / __| __| \| |_ _|
| _/ / _|| _|| _| (__ | | / _ \ (_ | _|| .` | | |
|_| |_|_\___|_| |___\___| |_| /_/ \_\___|___|_|\_| |_|
Agent started! Looking for work from queue 'Agent queue test'...
--------
# Run deployment.
% prefect deployment run flow_hello/flow_hello
Created flow run 'cerise-adder' (fc7e440d-05cb-4228-83a0-de7f70015531)
--------
# After execute command 'prefect deployment run flow_hello/flow_hello', output folling logs by Prefect Orion Agent.
22:27:59.810 | INFO | prefect.agent - Submitting flow run 'fc7e440d-05cb-4228-83a0-de7f70015531'
22:27:59.877 | INFO | prefect.infrastructure.process - Opening process 'cerise-adder'...
22:27:59.884 | INFO | prefect.agent - Completed submission of flow run 'fc7e440d-05cb-4228-83a0-de7f70015531'
--------
Taylor Curran
08/13/2022, 1:42 PMMasatoShima
08/13/2022, 1:43 PMTaylor Curran
08/13/2022, 1:45 PMtest
and started an agent using the same tag so they should work.MasatoShima
08/13/2022, 1:50 PMStrange. Looks like you build your deployment with tag test and started an agent using the same tag so they should work.I think so too. I created a new queue and tried it. However, it didn’t work…
prefect agent start 7a9b41ee-1e94-4f9d-b86f-865289ed0433
Taylor Curran
08/13/2022, 1:52 PMMasatoShima
08/13/2022, 2:06 PMTaylor Curran
08/13/2022, 2:07 PMMasatoShima
08/13/2022, 2:13 PMTaylor Curran
08/13/2022, 2:18 PMagent start command
instead of a tag?… I am stumped, but ultimately looks like things are working just your agent and work-queue aren’t talking properly for some reason. Sorry I can’t be of more help.
I’ll flag this to Anna, see if she notices anything I couldn’t when she gets back.prefect deployment ls
you see your test deployment listed. Same with work-queue.~/.prefect/profiles.toml
.MasatoShima
08/13/2022, 2:42 PMMaybe creating a work-queue and using the work-queue id in theinstead of a tag?agent start command
…
Sometimes I reset that file by just deleting itI got the same result....~/.prefect/profiles.toml
Double check that the terminal where you are running the agent, when you runI tried it. There seems to be no problem.you see your test deployment listed. Same with work-queue.prefect deployment ls
I am stumped, but ultimately looks like things are working just your agent and work-queue aren’t talking properly for some reason. Sorry I can’t be of more help.Don’t worry. I thank you for your help.
Anna Geller
08/13/2022, 3:03 PMMasatoShima
08/13/2022, 4:10 PMAnna Geller
08/13/2022, 6:39 PMMasatoShima
08/16/2022, 6:15 PMTaylor Curran
08/16/2022, 6:17 PM