mysterious-painter-66441
06/10/2025, 7:23 PMremote = FlyteRemote(
config=Config.auto(config_file=str(Path(__file__).parent.parent / "flytekit.config")),
default_project=PROJECT_NAME,
default_domain=PROJECT_DOMAIN,
)
wf = remote.fetch_workflow(
name="<http://workflows.test.wf|workflows.test.wf>", version=version, domain=PROJECT_DOMAIN, project=PROJECT_NAME
)
lp_name = "test_lp"
wf_lp = LaunchPlan.get_or_create(
name=lp_name,
workflow=wf,
default_inputs={
"input_num": 1
},
schedule=CronSchedule(schedule="0 0 1 * *"),
)
average-finland-92144
06/10/2025, 7:48 PMcan I fetch a workflow with specific version from flyte cluster, and then create and register a launch plan for it?absolutely. In this case you need to keep using remote, specifically the register_launch_plan method to create the LP with a remotely-fetched workflow
mysterious-painter-66441
06/10/2025, 7:57 PMLaunchPlan.get_or_create()
mysterious-painter-66441
06/10/2025, 8:06 PMremote.register_lanch_plan
functionmysterious-painter-66441
06/10/2025, 8:07 PMglamorous-carpet-83516
06/10/2025, 9:33 PMmysterious-painter-66441
06/11/2025, 6:38 PM