Yufei Li
07/30/2024, 8:25 PMDeployment.build_from_flow
with flow.deploy
. Previously we were using path
parameter in Deployment
class which indicates the path to the working directory for the workflow, relative to remote storage or, if stored on a local filesystem, an absolute path. However, there seems no equivalent parameter in the flow.deploy
, as the only way seems to be using flow.from_source (source = ..., entrypoint = ...).deploy(...)
. We wanna use an absolute path for local development since it's stored on a local filesystem, instead of pulling from the repo every time. Are there any way to do that?Nate
07/30/2024, 8:36 PMNate
07/30/2024, 8:37 PMYufei Li
07/30/2024, 9:57 PMdeployment_uuid = flow.from_source(source="my local path", # here's my local path
entrypoint="the entry point").deploy(
name = deployment_name,
schedules = schedules,
is_schedule_active = is_schedule_active,
parameters = {"job_uuid": job_uuid, "configuration_values": ""},
work_pool_name = work_pool_name,
tags = deployment_tags
)
However, it's saying RuntimeError: Failed to pull contents from remote storage 'my local path' to PosixPath('/var/folders/82/79sjhms94nv46hg57crphffm0000gp/T/tmpnj0twk3m/my local path')
Nate
07/30/2024, 9:59 PMRuntimeError: Failed to pull contents from remote storage 'my local path' to PosixPath('/var/folders/82/79sjhms94nv46hg57crphffm0000gp/T/tmpnj0twk3m/my local path')can you share more of the trace?
Yufei Li
07/31/2024, 2:08 PM'/Users/yufei.li/tangocard/prefect/prefect/'
I'm using to store the flows.
here's the code that failed
deployment_uuid = flow.from_source(source="/Users/yufei.li/tangocard/prefect/prefect/",
entrypoint=deployment_entrypoint.entrypoint).deploy(
name = deployment_name,
schedules = schedules,
is_schedule_active = is_schedule_active,
parameters = {"job_uuid": job_uuid, "configuration_values": ""}, # Override
work_pool_name = work_pool_name,
tags = deployment_tags
)
Nate
07/31/2024, 2:10 PMFileNotFoundError: ['/Users/yufei.li/tangocard/prefect/prefect/Users/yufei.li/tangocard/prefect/prefect']
it looks like there's an absolute path where there should be a relative one? or somehow the path has gotten doubled
can you show what you're giving as source
and entrypoint
? i suspect one / both of those values are the problemYufei Li
07/31/2024, 3:43 PMdeployment = RunnerDeployment.from_entrypoint(
name = deployment_name,
schedules = schedules,
is_schedule_active = is_schedule_active,
entrypoint = deployment_entrypoint.entrypoint,
parameters = {"job_uuid": job_uuid, "configuration_values": ""}, # Override
work_pool_name = work_pool_name,
tags = deployment_tags)
deployment_uuid = deployment.apply()
just wanna make sure that the RunnerDeployment
class wouldn't be deprecated from Sep, 2024, right?Nate
07/31/2024, 3:53 PMfrom_source
should work, but to answer the question, no we have no plans to deprecate RunnerDeployment
that said, in my opinion it might be worthwhile figuring out what was wrong with your use of from_source
instead of using a lower level util that we don't necessarily intend for direct (public) use in creating deploymentsYufei Li
07/31/2024, 4:21 PMfrom_source
issue. Once that's figured out, we'll go back to flow.from_source (source = ..., entrypoint = ...).deploy(...)
solution.Nate
07/31/2024, 4:22 PMYufei Li
07/31/2024, 4:31 PMNathan Low
07/31/2024, 9:30 PMNate
07/31/2024, 9:52 PMserve
is definitely not a direct replacement for build_from_flow
, .deploy
is the successor to build_from_flow
• serve
circumvents the need for a worker and makes the deployment ready to run now, its like Deployment + process worker together
• .deploy
(like build_from_flow
) will create the deployment for some worker to run it laterNate
07/31/2024, 9:53 PMNathan Low
07/31/2024, 9:55 PMNathan Low
07/31/2024, 9:59 PMNate
07/31/2024, 11:23 PMNathan Low
08/01/2024, 1:34 PMNathan Low
08/01/2024, 4:26 PMNate
08/01/2024, 4:46 PMNathan Low
08/01/2024, 4:48 PMNate
08/01/2024, 4:51 PMNathan Low
08/01/2024, 4:53 PMNate
08/01/2024, 5:04 PMNathan Low
08/01/2024, 5:07 PMNate
08/01/2024, 5:08 PMBring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by