Greg Gydush
12/15/2022, 2:50 AM[User] incorrectly specified launchplan projectb:development:projecta.workflows.test_workflow.wrapper_workflow:1, caused by: [NotFound] No launch plan retrieved from Admin, caused by: rpc error: code = NotFound desc = missing entity of type LAUNCH_PLAN with identifier project:"projectb" domain:"development" name:"projecta.workflows.test_workflow.wrapper_workflow" version:"1"
└── projecta
└── workflows
└── test_workflow.py (shown below)
from flytekit import LaunchPlan, dynamic, task, workflow
@task
def dummy_task(a: int) -> int:
return a
@workflow
def wrapper_workflow(a: int) -> int:
return dummy_task(a=a)
@dynamic
def dynamic_lp(a: int) -> int:
# In our real-world example, we are using LaunchPlan here rather than subworkflow to handle large fan out
lp = LaunchPlan.get_or_create(wrapper_workflow)
return lp(a=a)
@workflow
def workflow_test(a: int) -> int:
return dynamic_lp(a=a)
Project B:
from flytekit import workflow
from flytekit.core.launch_plan import reference_launch_plan
def interface(a: int) -> int:
...
rlp = reference_launch_plan(
project="projecta",
domain="development",
name="projecta.workflows.test_workflow.workflow_test",
version="1",
)(interface)
@workflow
def workflow_calling_reference(a: int) -> int:
return rlp(a=a)
This provides an example, where Project A’s workflow is registered, and subsequently called in Project B via a reference launch planYee
_F_SS_C
defined on it please?Greg Gydush
12/15/2022, 4:50 PMYee
Greg Gydush
12/15/2022, 6:01 PM_F_SS_C
Yee
Greg Gydush
12/15/2022, 6:38 PMYee
SerializationSettings.from_transport(...)
dynamic_lp
Greg Gydush
12/17/2022, 12:47 AMSerializationSettings.from_transport(...)
What should I be doing with it?Yee
looks like project/domain/version are null after deserializing_F_SS_C
Greg Gydush
12/17/2022, 12:49 AMYee
Greg Gydush
12/17/2022, 12:52 AM_F_SS_C
on the dynamic_lp
task’s configYee
Greg Gydush
12/17/2022, 1:04 AMpyflyte --config ${FLYTE_INTERNAL_CONFIGURATION_PATH} serialize --in-container-config-path flyte.cfg workflows -f ${TMP_DIR}/
flyte-cli register-files \
--domain ${FLYTE_INTERNAL_DOMAIN} \
--project ${FLYTE_INTERNAL_PROJECT} \
--version ${FLYTE_INTERNAL_VERSION} \
--kubernetes-service-account ${FLYTE_AUTH_KUBERNETES_SERVICE_ACCOUNT} \
$TMP_DIR/*
Yee
_F_SS_C
env var