https://prefect.io logo
Title
a

Andrew Richards

07/29/2022, 5:28 PM
Hi, I'm running into a few issues while trying to use Prefect 2.0 block storage. I'm receiving a CORS error in Chrome when I try to delete a block in the UI at app.prefect.cloud. I have no issue creating block storage through the UI or through Python.
Access to XMLHttpRequest at '<https://api.prefect.cloud/api/accounts/><MY ACCOUNT ID>/workspaces/<MY WORKSPACE ID>/block_documents/<MY BLOCK ID>' from origin '<https://app.prefect.cloud>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
It seems like CORS may be unhappy with the UI trying to do a cross-domain request from app.prefect.cloud to api.prefect.cloud?
1
Also when I try to build a deployment with
prefect deployment build -n test -t download_dataset -sb RemoteFileSystem/wasabi test-flow.py:download_job
I receive this error
Client error '404 Not Found' for url '<https://api.prefect.cloud/api/accounts/><MY ACCOUNT ID>/workspaces/<MY WORKSPACE ID>/block_types/slug/RemoteFileSystem/block_documents/name/wasabi?include_secrets=true'
. I'm able to interact with Prefect cloud from the CLI otherwise.
My goal is to use a RemoteFileSystem block for persistent storage in a Wasabi S3 bucket. I had this working in a previous version of the Prefect 2.0 cloud beta before Deployment Create was deprecated.
a

Anna Geller

07/29/2022, 6:38 PM
a

Andrew Richards

07/29/2022, 6:50 PM
I've read these docs initially. The issue I'm experiencing is that the
prefect deployment build
command cannot find the directory where my block storage is located when providing the
-sb
argument. I'm certain I'm logged into the Prefect Cloud correctly because I'm able to list the resources I've created.
Looks like someone fixed the CORS issue. I'm thinking
RemoteFileSystem
may not be a valid
block_type_slug
?
a

Andreas Nigg

07/30/2022, 9:12 AM
Hey Andrew, struggled myself, found out 😄 The slug for remote file system is remote-file-system, if I recall correctly
:thank-you: 1
a

Andrew Richards

07/30/2022, 3:33 PM
Thanks! That worked