-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
Allow to disable shallow clone from the project's settings #5989
Comments
I think we added this because we had a problem of space in our builders and also most of the projects does not need it. Also, I think the default should be to shallow clone and, when the user finds a problem, they can disable it. Finally, if we are moving to isolated builds that will remove everything after each build, we can enable it by default --although, this will impact in the build time. |
Yeah, I think even if we go for remove everything after build, this still is important to save us and the user build time. |
I'd like to stop adding configs in our |
Currently we parse the config file after clone, so we can't add that option there. We would need to change how we get the config file to support that. |
Yeah, good point. I suppose we would need to find an alternative solution. An idea: "perform two checkouts: one to get the config file and another one to get the whole repository"
|
Perhaps this is a bit of overkill for just loading the git configuration? Also, this would make the config version-wide, instead of project-wide. I agree with
|
@astrojuanlu it's not just about shallow clone setting, but about overriding the whole "potentially new" On the other hand, we were trying to move away from settings only available on the UI and saved on the DB in the past year, and thinking that we should put new ones on the config file. The problem with this approach, as you already realized, is how we define project-wide configs --but that's a discussion that should happen in a different issue 😄 |
It may not be necessary to make such a large change to the builder to allow overriding the checkout command completely. If there was a configurable hook that ran after the normal shallow clone, it could be used to convert it to a full clone. The git-fetch docs mention an |
That sounds very reasonable to me and if I remember correctly was also the choice of several different CI providers in the past. |
I tested this solution, #5989 (comment), with the PR that I'm working on at #9016 and it did work properly! 💯 So, I think that would be the suggested way to unshallow a git repository controlled by the user. |
Hi! In a few hours, we are deploying a new feature that will allow people to call arbitrary commands at different moments in the build process (see #9016). For example, build:
os: ubuntu-20.04
jobs:
post_checkout:
- git fetch --unshallow I think this new config key, |
Thank you so much for integrating this. RTD gains a lot of flexibility now! |
We have a lot of this requests
#5988
I think we all agree that we should put this on the advanced settings tab.
The default option should be true. We can add a migration to migrate all projects that have the feature flag.
The text was updated successfully, but these errors were encountered: