<#1394 [Feature] [flytekit] FlyteRemote listing of...
# flyte-github
a
#1394 [Feature] [flytekit] FlyteRemote listing of workflows and launch plans Issue created by wild-endeavor Motivation: Why do you think this is important? This issue is a continuation of #1290. That PR only provided for the listing of tasks and executions. The reason for this is because of the
promote_from_model
logic for
FlyteWorkflow
and
FlyteLaunchPlan
. For workflows, when promoting from model, we also need the definition of any launch plan nodes.
Copy code
@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/flyte