Open dqueruel-fy opened 15 hours ago
Hey @dqueruel-fy - those files are a consequence of persisting task and flow results.
I've tried to change the server config's PREFECT_LOCAL_STORAGE_PATH to /tmp/result but it didn't help
This setting has an effect at workflow runtime and therefore setting it on the server will have no effect (all server configuration is prefixed with PREFECT_SERVER_
). If you set this setting within the process that your workflows execute you should see the desired behavior.
For more information, check out the documentation on results and settings:
hi @dqueruel-fy - yes this sounds like expected behavior, that metadata is your serialized result
» PREFECT_LOCAL_STORAGE_PATH=/tmp/result ipython
In [1]: from prefect import task
In [2]: @task(persist_result=True)
...: def f():
...: return 42
...:
In [3]: f()
16:35:23.491 | INFO | Task run 'f' - Finished in state Completed()
Out[3]: 42
In [4]: !ls /tmp/result
109c10d275731f842f4b08dd51b397aa
when you say
I've tried to change the server config's PREFECT_LOCAL_STORAGE_PATH to /tmp/result but it didn't help
... was about to type the same as @cicdw above, nevermind 🙂
Bug summary
Issue description
I don't know if it's a bug or a desired behavior but some metadata files are generated each time I run my flows locally. That's annoying because the files are generated in my source directory (or from where I run the flows/tasks). I'd like to have more info, please, on what these files are and if we can generate it somewhere else or, ideally, not generate them at all.
It generates files with filenames like
89e55eaee58e8ce3567e87801196d9d5
in the same folder that I call the python script (see below) with the following content:The minimal reproducible python script is
Version info
Additional context
Some notes:
persist_result
toFalse
.3.0.0rc14
to3.1.1
in my code base, and I reproduced it in this minimal example.PREFECT_LOCAL_STORAGE_PATH
to/tmp/result
but it didn't help