Hi thank you for the amazing job on releasing 2.0....
# prefect-community
t
Hi thank you for the amazing job on releasing 2.0. I am trying the new deployment system with a
local file system
storage/block: my-local-storage. However when I try to build with the parameter "prefect deployment build --storage-block local-file-system/my-local-storage" I get an exception :
Copy code
File "/usr/local/lib/python3.10/site-packages/prefect/filesystems.py", line 114, in put_directory
    shutil.copytree(from_path, local_path, dirs_exist_ok=True)
NameError: name 'from_path' is not defined
Looking at the code : https://github.com/PrefectHQ/prefect/blob/2.0.0/src/prefect/filesystems.py#L114 it seems the variable "from_path" is indeed not defined.
1
a
I will reproduce within the next 1-2 hours, will report then
with local FS you don't really need to create blocks from the UI, it's much easier to just do:
Copy code
prefect deployment build path/to/flow.flowname --name deployname --tag agenttag
if this doesn't work, can you try in a new environment?
t
Thank you @Anna Geller for your inputs! I confirm that everything works as expected when not using the --storage-block command. But in my case, I want to specify the path where my manifest.json and deployment.yml are generated. How can I do that not using blocks or local file systems?
But I really suspect a code typo in the line I pointed before. I guess you should have a look, the variable
from_path
is not defined in the
put_directory
function IMO it should be replace by `to_path`: https://github.com/PrefectHQ/prefect/blob/2.0/src/prefect/filesystems.py#L114
a
why does it matter where the manifest is located? are you running it from CI? you can easily do:
Copy code
mv manifest.json /some/path/manifest.json
deployment.yaml is generated during build and only relevant for the apply step - you could remove it after running apply - the CLI commands is what matters and YAML is only to make it easier to adjust things before applying deployment modifications from the build step