José Duarte
09/14/2022, 1:24 PMpython -m prefect.engine flow_uuid , it fetches the flow but then tries to copy files into the same folder, in this case deployment.path is the cwd & pwd which in turn means that . resolves to deployment.path — making the filesystems.LocalFileSystem.get_directory copy the files into themselves (through shutil.copytree) which ends up in a HUGE error like so:
[<redacted for brevity>, '.', 'c', 'f', 'g', "'", '>', ' ', 'a', 'n', 'd', ' ', "'", '.', '/', '.', 'i', 's', 'o', 'r', 't', '.', 'c', 'f', 'g', "'", ' ', 'a', 'r', 'e', ' ', 't', 'h', 'e', ' ', 's', 'a', 'm', 'e', ' ', 'f', 'i', 'l', 'e', '<', 'D', 'i', 'r', 'E', 'n', 't', 'r', 'y', ' ', "'", '.', 'f', 'l', 'a', 'k', 'e', '8', "'", '>', ' ', 'a', 'n', 'd', ' ', "'", '.', '/', '.', 'f', 'l', 'a', 'k', 'e', '8', "'", ' ', 'a', 'r', 'e', ' ', 't', 'h', 'e', ' ', 's', 'a', 'm', 'e', ' ', 'f', 'i', 'l', 'e']
With regards to Prefect’s code, I have a solution, just check if both paths match and don’t copy in that case, but I’d like to get some feedback from the Prefect team before reporting a bug and sending in a fix — i.e. if I am doing something wrong.José Duarte
09/14/2022, 1:26 PMJosé Duarte
09/14/2022, 1:40 PM