Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why new storage account to enable user upload feature? #2196

Open
amirj opened this issue Nov 26, 2024 · 2 comments
Open

why new storage account to enable user upload feature? #2196

amirj opened this issue Nov 26, 2024 · 2 comments

Comments

@amirj
Copy link

amirj commented Nov 26, 2024

Hi,

The app is using two blob storage accounts, one of them named as blob_container_client and the other one is user_blob_container_client

Two questions:

  1. Could you help me to understand why we need two blobs and why not using the main blob since we're organising user's content in subfolders?
  2. How to set AZURE_USERSTORAGE_ACCOUNT? --unfortunately I need to set it manually and not via bicep--
@amirj
Copy link
Author

amirj commented Nov 26, 2024

I tried to set AZURE_USERSTORAGE_ACCOUNT to the same value as AZURE_STORAGE_ACCOUNT but getting the following error:

[2024-11-26 13:07:50 +0000] [62312] [INFO] 127.0.0.1:63543 GET /.auth/me 1.1 404 207 1635
INFO:app:Creating directory for user 289334a6-2dfe-4653-a2f1-0a856a2991cd
ERROR:app:Exception on request POST /upload
Traceback (most recent call last):
  File "/Users/test/chat/.venv/lib/python3.9/site-packages/quart/app.py", line 1403, in handle_request
    return await self.full_dispatch_request(request_context)
  File "/Users/test/chat/.venv/lib/python3.9/site-packages/quart/app.py", line 1441, in full_dispatch_request
    result = await self.handle_user_exception(error)
  File "/Users/test/chat/.venv/lib/python3.9/site-packages/quart/app.py", line 1029, in handle_user_exception
    raise error
  File "/Users/test/chat/.venv/lib/python3.9/site-packages/quart/app.py", line 1439, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/Users/test/chat/.venv/lib/python3.9/site-packages/quart/app.py", line 1535, in dispatch_request
    return await self.ensure_async(handler)(**request_.view_args)  # type: ignore
  File "/Users/test/chat/app/backend/decorators.py", line 53, in auth_handler
    return await route_fn(auth_claims)
  File "/Users/test/chat/app/backend/app.py", line 357, in upload
    await user_directory_client.create_directory()
  File "/Users/test/chat/.venv/lib/python3.9/site-packages/azure/core/tracing/decorator_async.py", line 105, in wrapper_use_tracer
    return await func(*args, **kwargs)
  File "/Users/test/chat/.venv/lib/python3.9/site-packages/azure/storage/filedatalake/aio/_data_lake_directory_client_async.py", line 178, in create_directory
    return await self._create('directory', metadata=metadata, **kwargs)
  File "/Users/test/chat/.venv/lib/python3.9/site-packages/azure/storage/filedatalake/aio/_path_client_async.py", line 216, in _create
    process_storage_error(error)
  File "/Users/test/chat/.venv/lib/python3.9/site-packages/azure/storage/filedatalake/_deserialize.py", line 224, in process_storage_error
    exec("raise error from None")   # pylint: disable=exec-used # nosec
  File "<string>", line 1, in <module>
azure.core.exceptions.HttpResponseError: (AuthorizationFailure) This request is not authorized to perform this operation.

@amirj
Copy link
Author

amirj commented Nov 26, 2024

@pamelafox If I upgrade my main blob to ADL Gen2, can I use the same blob across the whole project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant