<#3901 [BUG] Cache loading of nested list fails> I...
# flyte-github
a
#3901 [BUG] Cache loading of nested list fails Issue created by fellhorn Describe the bug Flytepropeller fails loading the cache for a nested list if one sub-list is empty. Minimal example workflow:
Copy code
from flytekit import workflow, task

@task(
    cache=True,
    cache_version="0"
)
def my_task() -> list[list[str]]:
    return [["foo"], []]

@workflow
def my_workflow():
    my_task()
Flytepropeller logs show this error:
Copy code
Error when trying to reconcile workflow. Error [Failed to check Catalog for previous results: unexpected artifactData: [o0] type: [collection_type:<union_type:<variants:<collection_type:<simple:NONE > > variants:<collection_type:<simple:STRING > > > > ]
which looks like that it interprets the type of
Copy code
{
  "o0": [
    [
      "foo"
    ],
    []
  ]
}
as
Copy code
list[Union[list[None],list[str]]
instead of
Copy code
list[list[str]]
User experience For the user the task is just stuck in
Queued
and they need access to the flytepropeller logs to do any debugging. Expected behavior • Caching should also work for these nested lists with empty sub-lists • Ideally flytepropeller error logs are present in the frontend and the task fails for caching issues instead of being stuck in Queued Additional context to reproduce 1. Execute the workflow from above once to write the cache 2. Execute it a second time and the task should be stuck in Queued Screenshots No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte