Hi all - has anyone used a Github storage block with a repo that has a git submodule? Is there a convenient way to pull the git submodule at runtime?
✅ 1
Trent Shapiro
06/22/2023, 5:52 PM
Copy code
from prefect.filesystems import GitHub
submodule_block = GitHub.load("submodule-block-name")
submodule_block.get_directory(local_path=submodule_folder_path)
is what i'm doing now, but requires setting up a separate github block for the submodule. wish there was an option to add
--recurse-submodules --remote-submodules
to the initial repo clone
b
Bianca Hoch
06/22/2023, 7:51 PM
Hi Trent! I'm not sure about the Github storage block having that functionality, but it looks like you should be able to include git submodules when cloning a repository via the prefect.yaml pull action.
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.