-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove deployments
module
#13373
Remove deployments
module
#13373
Conversation
This reverts commit c99709f.
@@ -147,7 +146,7 @@ | |||
PausedRun, | |||
UpstreamTaskError, | |||
) | |||
from prefect.flows import Flow, load_flow_from_entrypoint | |||
from prefect.flows import Flow, load_flow_from_entrypoint, load_flow_from_flow_run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flows
seemed a logical place to me for load_flow_from_flow_run
to move (it's currently in deployments
). Directly moved, no changes
src/prefect/flow_runs.py
Outdated
@inject_client | ||
async def run_deployment( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving run_deployment
to flow_runs
module made sense to me because it creates and returns a flow run. Directly moved, no changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm structurally doing from prefect.deployments import run_deployment
makes a lot of sense to me, since flow runs dont need to have anything to do with deployments
do you think it might make sense to have something like prefect.deployments.flow_runs
so we can easily expose run_deployment
in prefect.deployments
's __init__
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it also feels like if a prefect.deployments.flow_runs
existed load_flow_from_flow_run
might make sense there too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that a lot! Good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved run_deployment
to deployments.flow_runs.py
in 95a88a8, but since load_flow_from_flow_run
is only used by the new_flow_engine
, the runner
, and the engine
, I think it makes sense to keep moved to flows
with the other load_flow_from_x
, as we already import from there into the engine(s) and runner.
tests/test_flow_runs.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moves tests from test_deployments
to test_flow_runs.py
. Superficial changes only.
tests/test_flows.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moves tests from test_deployments
to test_flows.py
. Superficial changes only.
c4d0cc3
to
5c96488
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋
Closes #13358
Deployment
andload_deployments_from_yaml
run_deployment
toflow_runs
moduleload_flow_from_flow_run
toflows
moduletest_deployments
totest_flow_runs
andtest_flows