Hi, I tried setting `PREFECT_DEFAULT_RESULT_STORAG...
# prefect-getting-started
p
Hi, I tried setting
PREFECT_DEFAULT_RESULT_STORAGE_BLOCK=azure-blob-storage-container/my-bucket-name
on the server and it seems to be recognized, because in UI -> settings I see it set correctly. However, the flow results end up in local storage anyway. What am I missing? I also tried specifying this setting via prefect config set, but that had no effect. This is prefect 2.19.5. I'm testing this flow
Copy code
@flow(persist_result=True)
def test_result_storage_flow():
    return "test"
If I specify the same storage block with
Copy code
@flow(persist_result=True, result_storage=STORAGE_BLOCK)
it works just fine.
Solved it. For future reference: this setting has to be set in the docker container that runs the task, not on the server. So you can set it with
job_variables={"env": {"PREFECT_DEFAULT_RESULT_STORAGE_BLOCK": ...}}
when running the job and it will be respected then. I'm not sure why this isn't inherited from server variables though.
n
yep, you got it!
I'm not sure why this isn't inherited from server variables though.
in general clients don't really know things like that about the server they're talking to, and will never inherit env from the server. results are created client-side and written to storage from the client-side, so thats where we need to be able to know your preference for where to store it