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

I am having troubles setting up user uploads properly. #2315

Open
moelk-atea opened this issue Jan 31, 2025 · 0 comments
Open

I am having troubles setting up user uploads properly. #2315

moelk-atea opened this issue Jan 31, 2025 · 0 comments

Comments

@moelk-atea
Copy link

moelk-atea commented Jan 31, 2025

**I start by running the following commands:

  1. azd auth login --use-device-code --tenant-id <ENTER THE TENANT-ID>
  2. azd env set DEPLOYMENT_TARGET appservice
  3. azd env set AZURE_USE_AUTHENTICATION true
  4. azd env set AZURE_ENABLE_GLOBAL_DOCUMENT_ACCESS true
  5. azd env set AZURE_AUTH_TENANT_ID <ENTER THE TENANT-ID>**

Everything until this point works if I run azd up.

When I try to make a new deployment entering commands 1 to 5 from above then proceeding with the following commands:

  1. azd env set USE_USER_UPLOAD true
  2. azd env set AZURE_ADLS_GEN2_STORAGE_ACCOUNT **### Here I enter a random storage account name which I assume will be set to the ADLS when runningazd up`**

Then when I run azd up everything works fine until when trying to run prepdocs, then I get the following error:

`Traceback (most recent call last):
File "/Users/moelk/dev/AzureOpenAIApp/msragsolution/azure-rag-app/./app/backend/prepdocs.py", line 354, in
list_file_strategy = setup_list_file_strategy(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/moelk/dev/AzureOpenAIApp/msragsolution/azure-rag-app/./app/backend/prepdocs.py", line 94, in setup_list_file_strategy
raise ValueError("DataLake file system and path are required when using Azure Data Lake Gen2")
ValueError: DataLake file system and path are required when using Azure Data Lake Gen2

ERROR: error executing step command 'provision': failed running post hooks: 'postprovision' hook failed with exit code: '1', Path: '/var/folders/fb/12qvn4_x40j78mbpzg6_xbw40000gn/T/azd-postprovision-127818477.sh'. : exit code: 1`

**I dont understand how I can setup the filesystem and path for DataLake before the Data Lake being deployed.

I did a re-attempt by setting up a new deployment running commands 1 to 6 then enter the following command:**

azd env set AZURE_ADLS_GEN2_STORAGE_ACCOUNT ` ## This time I tried a random one and tried entering the storage account name for users. Then I ran the following scripts

python /scripts/adlsgen2setup.py './data/*' --data-access-control './scripts/sampleacls.json' -v

Then I got the following error when entering the user storage name:

Traceback (most recent call last):
  File "/Users/moelk/dev/AzureOpenAIApp/msragsolution/azure-rag-app/scripts/adlsgen2setup.py", line 198, in <module>
    asyncio.run(main(args))
  File "/opt/anaconda3/envs/ai-atea/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/ai-atea/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/ai-atea/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/moelk/dev/AzureOpenAIApp/msragsolution/azure-rag-app/scripts/adlsgen2setup.py", line 174, in main
    await command.run()
  File "/Users/moelk/dev/AzureOpenAIApp/msragsolution/azure-rag-app/scripts/adlsgen2setup.py", line 69, in run
    group_id = await self.create_or_get_group(group)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/moelk/dev/AzureOpenAIApp/msragsolution/azure-rag-app/scripts/adlsgen2setup.py", line 151, in create_or_get_group
    raise Exception(content)
Exception: {'error': {'code': 'Request_BadRequest', 'message': "A value is required for property 'mailEnabled' of resource 'Group'.", 'innerError': {'date': '2025-01-31T15:07:01', 'request-id': '78e5f5e3-579d-4a9b-8b74-4856172fc2df', 'client-request-id': '78e5f5e3-579d-4a9b-8b74-4856172fc2df'}}}

Lastly I did a redeploy without Data Lake Storage, and the user uploads function works for uploading a document but other people can see those documents too. When I look at the metadata for the data I see that the oids are set but still other people can see and chat with the document. I'm so confused, could someone please help me navigate through this mess.

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