acoustic-carpenter-78188
05/22/2025, 12:09 AMpromote_from_model logic for FlyteWorkflow and FlyteLaunchPlan.
For workflows, when promoting from model, we also need the definition of any launch plan nodes.
@classmethod
def promote_from_model(
cls,
base_model: _workflow_models.WorkflowTemplate,
sub_workflows: Optional[Dict[_identifier.Identifier, _workflow_models.WorkflowTemplate]] = None,
node_launch_plans: Optional[Dict[_identifier.Identifier, _launch_plan_models.LaunchPlanSpec]] = None,
tasks: Optional[Dict[_identifier.Identifier, _task_models.TaskTemplate]] = None,
) -> "FlyteWorkflow":
For FlyteLaunchPlan, fetching implies
https://github.com/flyteorg/flytekit/blob/b49578b931bf092f7f8ea743abe3ca4a46466f18/flytekit/remote/remote.py#L400-L403
technically also implies the fetching of the underlying workflow for completion's sake.
We can't get all this information today from one Admin call. That means that listing 100 workflows could trigger a whole ton of requests to Admin. This is a separate ticket because we should think about whether there's a better way of doing this.
flyteorg/flytecuddly-jelly-27016
05/22/2025, 12:09 AM