Daniel Bast
07/30/2021, 2:03 PMDaniel Bast
07/30/2021, 2:06 PMKevin Kho
.yml and .sql files.
The Git storage class clones the whole repo, runs the script with the flow code, and then deletes that temporary repo. So in order to get this to work, you might have to change your imports (not super sure but I think they should all be absolute rather than relative and then imported from the project root). Second, all the imports must happen before tasks start executing (so put them at top of the file) because the repo will get deleted before the flow runs. A bit more docs hereDaniel Bast
07/30/2021, 2:15 PMDaniel Bast
07/30/2021, 3:02 PMprefect build/register and importing during flow run is fine... if everything is in one subfolder (flows + common code), it requires then sys.path.append hacks 😕Chris L.
07/30/2021, 3:15 PMChris L.
07/30/2021, 3:15 PMChris L.
07/30/2021, 3:16 PMimport mypkg.common_code ) to avoid all sys.path.append hacks!Chris L.
07/30/2021, 3:33 PMKevin Kho
Daniel Bast
07/30/2021, 3:33 PMDaniel Bast
07/30/2021, 3:35 PMKevin Kho
clone the repo in your flow yourself and manage it that way? You might be able to use this utility class, but just note it’s not public facing so we might change it.Daniel Bast
07/30/2021, 3:52 PMKevin Kho
pip install it as a module? If you have a setup.py , could you clone it then run a shell command to pip install? Though I suppose that’s way more involved than the original intentionDaniel Bast
07/30/2021, 4:02 PMKevin Kho
Daniel Bast
07/30/2021, 4:49 PMDaniel Bast
08/06/2021, 1:55 PMKevin Kho
register_worker_plugin call if you have the repo?