https://prefect.io logo
m

Mike Levenson

08/31/2023, 4:06 PM
Hey all have urgent question, what is the best way to specify result location for a deployment?
n

Nate

08/31/2023, 6:03 PM
you do actually specify this on the flow, so you could use
stored_flow = my_flow.with_options(result_storage=Block.load("s3/mybucketblockname")
m

Mike Levenson

08/31/2023, 6:34 PM
so I am trying to load and its not working for some reason:
Copy code
prefect.exceptions.PrefectHTTPStatusError: Client error '404 Not Found' for url '<http://ephemeral-prefect/api/block_types/slug/s3/block_documents/name/my-block-name?include_secrets=true>'
Response: {'detail': 'Block document not found'}
n

Nate

08/31/2023, 7:14 PM
do you see the block you need in
prefect block ls
if you run that against the same server?
m

Mike Levenson

08/31/2023, 7:34 PM
nope.... im loading the flow inside of a ray serve deployment on cluster startup. I guess its not setting the prefect config correctly
n

Nate

08/31/2023, 7:52 PM
gotcha, you'll need to have PREFECT_API_KEY and PREFECT_API_URL set on the machine that's trying to load that block from the server that has it saved