<#3218 [BUG] Misleading/erroneous `Caching was dis...
# flyte-github
a
#3218 [BUG] Misleading/erroneous `Caching was disabled for this execution.` for tasks with cache enabled Issue created by fg91 Describe the bug When a Python task - which has the cache enabled - fails, the flyte console displays an erroneous and misleading warning that
Caching was disabled for this execution.
I have also seen this warning for *_successful_ tasks (see screenshot) even though I unfortunately cannot come up with a minimal example to consistently reproduce this. Expected behavior This warning should not be shown. Additional context to reproduce
Copy code
from flytekit import task, workflow


@task(
    cache=True,
    cache_version="1.0",
)
def fail() -> None:
    raise Exception()

@workflow
def workflow():
    fail()
Screenshots

Screenshot 2023-01-09 at 16 24 40

Screenshot 2023-01-09 at 16 24 45

Erroneous warning for a successful task with _cache enabled_:

Screenshot 2023-01-09 at 17 20 56

Screenshot 2023-01-10 at 10 00 53

I downloaded the tarball containing the code in order to make sure that for the respective version the cache is in fact enabled:

Screenshot 2023-01-10 at 12 05 56

Screenshot 2023-01-10 at 12 05 35

Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte