Keshav Sharma
10/10/2022, 4:43 AMlaunch plans
with different set of fixed inputs
for an existing workflow
.
I am following flytekit documentation to fetch a workflow and create a launchplan for it.
The following in the code snippet from above docs:
from flytekit import LaunchPlan
flyte_workflow = remote.fetch_workflow(
name="my_workflow", version="v1", project="flytesnacks", domain="development"
)
launch_plan = LaunchPlan.get_or_create(name="my_launch_plan", workflow=flyte_workflow)
Creating a launchplan fails with the following error:
File "/Users/.../lib/python3.7/site-packages/flytekit/core/launch_plan.py", line 143, in create
native_types=workflow.python_interface.inputs,
AttributeError: 'NoneType' object has no attribute 'inputs'
python_interface
attribute of workflow object returned by fetch_workflow
is None, although the workflow is a valid one and when i register a launchplan using "register files" in cli, it works.
flytekit version: 1.1.0
flyte helm chart version: 1.1.0
Any help appreciated.Ketan (kumare3)
Samhita Alla
Keshav Sharma
10/10/2022, 7:13 AMgenerated_lp = LaunchPlan.get_or_create(
name="somename",
workflow=fetched_workflow,
# specify the input value for the workflow when it's being triggered by the scheduler
fixed_inputs={
"input1": "value1",
"input2": "value2"
}
)
LaunchPlan.get_or_create
ends up in errorSamhita Alla
Keshav Sharma
10/10/2022, 7:38 AMfetch_workflow
method to LaunchPlan.get_or_create
method
registration works fine if i use cli and pass the workflow annotated imported from fileSamhita Alla
Kevin Su
10/10/2022, 3:31 PMKeshav Sharma
10/11/2022, 7:45 AMKevin Su
10/11/2022, 4:06 PM