-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sparse checkout for git pulls #15185
Comments
Makes sense, and seems potentially doable using something like https://git-scm.com/docs/git-sparse-checkout |
I had a go at creating a branch for this feature: https://github.com/tetracionist/prefect/tree/sparse-checkout-for-git-pulls It uses sparse-checkout, but to get it to work, I needed to update the Git version on my laptop to version I tested this using a public repository and a process worker and it gave me a directory with the folders I specified. The config works like this: pull:
- prefect.deployments.steps.git_clone:
repository: https://github.com/tetracionist/prefect.git
branch: sparse-checkout-for-git-pulls
access_token:
directories: [src/integrations/prefect-azure, src/integrations/prefect-dask]
cone_mode: True # set to true by default, only need to include if False |
Describe the current behavior
When cloning a git repository, the entire repository is cloned, this can take longer than the flow run itself.
Describe the proposed behavior
Additional configuration in prefect.yaml, and equivalent commands should permit a sparse checkout, maybe just of a single directory.
An additional touch would be to make the selected directory become the base of the clone, rather than retaining the full path, making it easy to just keep paths relative in code.
Example Use
in prefect.yaml
Additional context
No response
The text was updated successfully, but these errors were encountered: