Hi @Nate thank you so much you are the only one that respond to my question yes absolutely so the working directory is on my RDP on C:/prefect-sba that folder contain a flows folder and also a venv folder for all the python packages to start the prefect agent i do this
First I go to C:/prefect-sba and activate the venv folder, Once venv is activate I run this commands
prefect cloud login -k pnu_uxxxxxxx
prefect agent start --pool "default-agent-pool" --work-queue "test"
and for my deployments I use the same C:/prefect-sba folder with venv I have 16 deployments currently
prefect deployment build -n zCrmSyncDataAirtable -q test flows/zcrm.py:sync_zoho_data_to_airtable -sb github/prefect-repo --apply
for each deployment that may require to save or read files I click on the prefect ui -> infrastructure (annonyimus912481....) -> then edit and change the working dir parameter to C:\prefect-sba that way when running from the cloud and require to read something it would retrieve it from that folder
Each deployment access a different folder or file so the issue is not that I am trying to open save or read the same time on 2 different deplomemnts
The deployments don't event start is 0 seconds of exeuction time
Downloading flow code from storage at ''
085956 PM
prefect.flow_runs
ERROR
Flow could not be retrieved from deployment.
Traceback (most recent call last):
File "C:\Users\sebastiansbaprefect\AppData\Local\Programs\Python\Python312\Lib\site-packages\prefect\engine.py", line 422, in retrieve_flow_then_begin_flow_run
else await load_flow_from_flow_run(flow_run, client=client)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sebastiansbaprefect\AppData\Local\Programs\Python\Python312\Lib\site-packages\prefect\client\utilities.py", line 100, in with_injected_client
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sebastiansbaprefect\AppData\Local\Programs\Python\Python312\Lib\site-packages\prefect\deployments\deployments.py", line 298, in load_flow_from_flow_run
await storage_block.get_directory(from_path=from_path, local_path=".")
File "C:\Users\sebastiansbaprefect\AppData\Local\Programs\Python\Python312\Lib\site-packages\prefect\filesystems.py", line 1014, in get_directory
copytree(
File "C:\Users\sebastiansbaprefect\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 600, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\sebastiansbaprefect\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 554, in _copytree
raise Error(errors)
shutil.Error: [('C:\\Users\\SEBAST~1\\AppData\\Local\\Temp\\tmpu9f948ywprefect\\flows\\src\\zdesk_http\\zdesk_http.py', '.\\flows\\src\\zdesk_http\\zdesk_http.py', '[WinError 32] The process cannot access the file because it is being used by another process')]
Is really weird that it tries to access a temp folder and that SEBAST-1 is a old route from a previous RDP we change to a new one and faster (the previous one already present the shutil error)
I think it would solve if I prevent prefect to pulling and overwrirting the code of my project everytime it invoke a deployment , like the github block already tell where the code exist ? is mandatory that overwrite? Thanks in advance