https://prefect.io logo
#prefect-community
Title
# prefect-community
d

Dan DiPasquo

06/09/2020, 6:44 PM
Trying to track down strange behavior vis-a-vis cacheing; I run a flow 3 times with same input, the first time task in question is run and then cached and flow succeeds; the second time task is satisfied by cache hit and flow succeeds; the third time (and fourth and 5th times) the task seems to neither be satisfied by cache hit, nor run, and downstream dependencies fail -- log from successful cache hit looks like:
Copy code
Task 'run_...': 1 candidate cached states were found
11:19:32 PDT
INFO
GCSTmpFileHashResultHandler
Starting to download result .....
INFO
GCSTmpFileHashResultHandler
Finished downloading result ....
DEBUG
CloudTaskRunner
Task 'run_...': Handling state change from Pending to Cached
Log from same task with subsequent flow runs neither shows the file download nor logs that no valid cache results were used:
Copy code
Task 'run_...': Starting task run...
11:23:43 PDT
DEBUG
CloudTaskRunner
Task 'run_...': 3 candidate cached states were found
11:23:43 PDT
DEBUG
CloudTaskRunner
Task 'run_...': Handling state change from Pending to Cached
11:23:43 PDT
DEBUG
CloudTaskRunner
Task 'run_...': can't set state to Running because it isn't Pending; ending run.
11:23:43 PDT
INFO
CloudTaskRunner
Task 'run_...': finished task run for task with final state: 'Cached'
Suggestions for tracing this further would be appreciated -
j

Jim Crist-Harif

06/09/2020, 6:56 PM
Hi Dan, that is really odd behavior. This might be better as a github issue - could you file one? It looks like you're using a custom result hander (
GCSTmpFileHashResultHandler
), if you're using a new-ish version of prefect those are deprecated in favor of
Result
classes, so this may be part of the shakeup from that.
d

Dan DiPasquo

06/09/2020, 7:26 PM
Thanks, Jim. Yes, we know about the new Result interface, but aiming to do this incrementally, upgrading from 0.10.7 to 0.11 (where I am now) while keeping flows running, and subsequently replacing our custom result handler either with something newly out of the box, or at least updating it comply with new interface.
I will open an issue, thanks