Hi :wave: In my Flyte application, I have an exist...
# ask-the-community
h
Hi 👋 In my Flyte application, I have an existing launchplan for the main workflow. Now, I am trying to create another launchplan for a wrapper workflow, that in turn would invoke the main workflow. But when I try to create the new one, I am getting this
The cached values aren't the same as the current call arguments
. What I am not able to figure out is why does it attempt to look for cached results when its completely a new launch plan. Any idea why would this happen ?
Copy code
# EXISTING LAUNCHPLAN
for ecosystem in parameters["ecosystems"]:
    LaunchPlan.get_or_create(
        name=f"launch_plan_{ecosystem.replace('-','_')}",
        workflow=main_workflow,
        schedule=CronSchedule(schedule=parameters["schedule"]),
        fixed_inputs={
            "ecosystem": ecosystem,
            "lookback": parameters["lookback"],
        },
        max_parallelism=N_WORKERS,
    )

# NEW LAUNCHPLAN
for ecosystem in parameters["ecosystems"]:
    LaunchPlan.get_or_create(
        name="launch_plan_wrapper",
        workflow=wrapper_workflow,
        fixed_inputs={"ecosystem": ecosystem, "backfill": 2},
    )
d
@Hema Jayachandran the error message points to a known bug The workaround mentioned there implies separating the launchplan definition on a different file. Could you try it to see if works for you?
h
Hey David, thanks for sharing the link. We already have them separated from workflows/tasks and have it in
launch_plan.py
. I was able to create multiple launch plans in one of our other application where the flytekit version is
1.8.1
. The above failing application has version 1.9.1 but I also tried with 1.11.0, still get the same error.
I tried by removing the for loop on the new launchplan and it worked. So I think, its because of the for loop as on the first input, it creates a launch plan where fixed input is ecosystem. Then on the second input, where its a different ecosystem, it is trying to get the cached results and mostly fails due to the ecosystem parameter difference. And the reason it worked in the other application, was because the config only had one value for ecosystems. So I should may be try not to set the params as fixed input.
d
brilliant debugging, thanks for sharing