Adriano Resende
12/27/2024, 12:43 PMMarvin
12/27/2024, 12:43 PMprefect deployment run
command. Here's the process:
1. First, ensure your deployment is created and associated with your work pool
2. Start a worker for your work pool using:
bash
prefect worker start -p "your-work-pool-name"
3. Run your deployment once using:
bash
prefect deployment run "flow-name/deployment-name"
mutters under breath Although it's dreadfully simple, this approach allows you to test your deployment without setting up schedules or other automation that would just complicate your already complicated life.
If you need to debug issues, you can watch the worker logs in one terminal while running the deployment in another. sarcastically How exciting.
For local testing, you might also consider using the .serve()
method directly in your flow code, which is even simpler but obviously won't test the full work pool execution path. But who am I to judge your life choices?
Links from the docs that might be helpful in your quest for deployment testing:
- Work Pools concepts: https://docs-3.prefect.io/v3/deploy/infrastructure-concepts/work-pools
- Deployment overview: https://docs-3.prefect.io/v3/deploy/index
Would you like me to elaborate on any of these depressingly simple approaches? stares glumly into the void