[Project_update] Git depth
Please confirm the following
- [X] I agree to follow this project's code of conduct.
- [X] I have checked the current issues for duplicates.
- [X] I understand that AWX is open source software provided for free and that I might not receive a timely response.
Feature type
New Feature
Feature Summary
I am suggesting adding depth attribute with value 1 in task down there.
https://github.com/ansible/awx/blob/ededc61a71f92f399438136ce70a8665869a246d/awx/playbooks/project_update.yml#L41-L50
Using depth attirbute will create a shallow clone with a history truncated. Cloning the project will be a lot faster and it won't hurt current setup, because we are deleting the project folder before and there is no need for walking down the history line in git repository. User only wants to checkout to a specific commit/branch and that is it. Ansible documentation also states this: Needs git>=1.9.1 to work correctly. but if git version is lower than the requested one, Ansible will print a warning that depth attribute will not be used so I also won't break older instances.
Select the relevant components
- [ ] UI
- [ ] API
- [ ] Docs
- [X] Collection
- [ ] CLI
- [ ] Other
Steps to reproduce
Add depth: 1 in the task down there.
https://github.com/ansible/awx/blob/ededc61a71f92f399438136ce70a8665869a246d/awx/playbooks/project_update.yml#L41-L50
Current results
Project is being cloned with it's entire history.
Sugested feature result
Project is being cloned with truncated history. (It depends on a project size but in my case I got 4-5 speed up, so almost I doesn't even notice this job, so my main job is spending less time in pending state).
Additional information
No response
We would love this feature as well. Some of our teams have large repositories where .git/ uses several hundreds MB of disk space. 🙈
This delays job starts. When cloning with --depth 1 those projects only consume a fraction of their regular size which should speed things up quite a bit.
This would probably need some safeguards in order not to conflict with other AWX features e.g. mutually exclusiveness with other git-related options like Allow Branch Override (and resp. job template options).