allow entrypoint
in a prefect.yaml to be a python module instead of a path
#16998
Labels
enhancement
An improvement of an existing feature
Describe the current behavior
Currently,
entrypoint
needs to be a path that is relative to the root of your github directory. At the same time, it needs to be relative to the CWD that you are runningprefect deploy
from, which leads to: you must always callprefect deploy
from the root of your directoryThis isn't always the best setup for repos (like multi-project repos), and it's also just a bit more confusing than it needs to be: relative-path routing is hard :D
Describe the proposed behavior
I'm proposing that
entrypoint
allow absolute module paths in python in addition to file paths, keyed internally in prefect by the presence of.
in the value. If I have a repo like sonow, I can simply put
entrypoint: flows.my_flow.main
instead of having to think about paths. This way, I can guarantee that what i want to be run is being run, and itll work from anywhere.This can take inspiration from modal, which offers the same
modal deploy src/project/app.py
ormodal deploy project.app
both work, and for production i always use the latter.Example Use
Additional context
No response
The text was updated successfully, but these errors were encountered: