Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
Signed-off-by: cosmicBboy <[email protected]>
  • Loading branch information
cosmicBboy committed Apr 1, 2021
1 parent 43340dd commit f77ecec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions flytekit/control_plane/component_nodes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging as _logging

from typing import Dict

from flytekit.common.core import identifier as _identifier
Expand Down Expand Up @@ -122,16 +121,13 @@ def promote_from_model(
sub_workflows[base_model.reference], sub_workflows=sub_workflows, tasks=tasks,
)
)

# If not found for some reason, fetch it from Admin again. The reason there is a warning here but not for
# tasks is because sub-workflows should always be passed along. Ideally subworkflows are never even
# registered with Admin, so fetching from Admin ideelly doesn't return anything
_logging.warning(
f"Your subworkflow with id {base_model.reference} is not included in the promote call."
)
_logging.warning(f"Your subworkflow with id {base_model.reference} is not included in the promote call.")
return cls(flyte_workflow=_workflow.FlyteWorkflow.fetch(*fetch_args))

raise _system_exceptions.FlyteSystemException(
"Bad workflow node model, neither subworkflow nor launchplan specified."
)

2 changes: 1 addition & 1 deletion flytekit/control_plane/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from flytekit.common.exceptions import system as _system_exceptions
from flytekit.common.exceptions import user as _user_exceptions
from flytekit.common.mixins import hash as _hash_mixin
from flytekit.common.nodes import ParameterMapper, OutputParameterMapper
from flytekit.common.nodes import OutputParameterMapper, ParameterMapper
from flytekit.common.utils import _dnsify
from flytekit.control_plane import component_nodes as _component_nodes
from flytekit.control_plane.tasks.task import FlyteTask
Expand Down

0 comments on commit f77ecec

Please sign in to comment.