PrefectHQ / prefect

Prefect is a workflow orchestration framework for building resilient data pipelines in Python.
https://prefect.io
Apache License 2.0
15.33k stars 1.5k forks source link

Unsolicited caching #14236

Closed zzstoatzz closed 1 week ago

zzstoatzz commented 1 week ago

First check

Bug summary

I never asked for caching

Reproduction

In [1]: from prefect import task, flow

In [2]: @task
   ...: def foo():
   ...:     return "asdf"
   ...:

In [3]: @flow
   ...: def f():
   ...:     foo()
   ...:     foo()
   ...:

In [4]: f()
15:23:57.429 | INFO    | prefect.engine - Created flow run 'chirpy-earwig' for flow 'f'
15:23:58.070 | INFO    | Task run 'foo-0' - Created task run 'foo-0' for task 'foo'
15:23:58.506 | INFO    | Task run 'foo-0' - Finished in state Completed()
15:23:58.710 | INFO    | Task run 'foo-1' - Created task run 'foo-1' for task 'foo'
15:23:59.116 | INFO    | Task run 'foo-1' - Finished in state Cached(type=COMPLETED)
15:23:59.246 | INFO    | Flow run 'chirpy-earwig' - Finished in state Completed()

Error

I never asked for caching

Versions

In [5]: !prefect version
Version:             3.0.0rc7+23.ge03f13954a.dirty
API version:         0.8.4
Python version:      3.12.3
Git commit:          e03f1395
Built:               Fri, Jun 21, 2024 3:09 PM
OS/Arch:             darwin/arm64
Profile:             pong
Server type:         cloud
Pydantic version:    2.7.4

Additional context

this would reliably cause FileNotFoundErrors in containerized environments