CircleCI-Public / path-filtering-orb

MIT License
24 stars 57 forks source link

Can we enable shallow cloning? #71

Open BenSandeen opened 1 year ago

BenSandeen commented 1 year ago

Describe Request:

The code checkout step of this orb is the vast majority of the build time for this step in our CircleCI workflow. Shallow checkout (ie: using git clone --depth=1 would cut this step's duration by roughly 75% for our monolith codebase

Examples:

I don't know enough about how this orb works to provide code examples, but I may be willing to learn if it's not too involved

Supporting Documentation Links:

Here's our current task that uses this orb:

Screenshot 2023-04-14 at 10 27 02 AM

We use this shallow_checkout orb (https://circleci.com/developer/orbs/orb/datacamp/shallow-checkout) for the following steps of this build, and it routinely runs the code checkout step in 9-10 seconds, which would be a great benefit to speed up our builds a bit

Peter-Darton-i2 commented 1 year ago

CircleCI is the first CI system I've used in years that doesn't do shallow clones by default. The lack of support for shallow clones is very disappointing 😞

eli-adept commented 1 year ago

Also interested in this. There seems to be an old closed PR that implemented this using another orb

https://github.com/CircleCI-Public/path-filtering-orb/pull/48/files

I'm happy to revive that attempt or hack together another solution if the maintainers have any appetite for this change

Fernando-Abreu commented 1 year ago

I will add this to our backlog.

BenSandeen commented 1 year ago

Is there any chance we could just merge that PR? Do we know why @kynefuk closed it?

krzema12 commented 10 months ago

Our repo takes over a minute to clone entirely. The tip of it is pretty lightweight now, clones within several seconds. Given that our CI worfklow uses path filtering, and then in other jobs we need to clone the repo again, it currently takes 2 extra minutes that we could save on cloning. While we have control over what happens in the other jobs, we can just optimize them. The initial step using the path-filtering orb is not possible to optimize (at least without rewriting it) because this ticket is still not addressed.

Please consider implementing this simple feature that will save compute resources (also your workers!) and improve productivity of multiple engineers.

sebastian-lerner commented 7 months ago

Hey folks, I'm a product manager at CircleCI, we are testing out a "blobless clone" which we hope will achieve a similar outcome as a shallow clone. If you would like to be included in early testing, email me at sebastian@circleci.com

edoardo-bluframe commented 1 month ago

Hey everybody

We really need this over here - like 2 min 45 sec each time of extra build when all we need is shallow??

This is a really cool orb but we do need that feature

Is there a way we can help?

Maybe we can have a look at that PR from @kynefuk?

Create a new one?

What kinda support do you need from the community to make this happen?? :smile: