-
-
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
Shallow clone breaks build #5031
Comments
I'm guessing this is because the |
Indeed 😞 |
@stsewd I think we should add a Feature flag for these cases to omit shallowing. |
We have to options here, feature flag (this can only be added by the core team), or an option in the web interface (this can be handled by the user). |
Yeah, I've been looking at this. I see both approaches were adopted for submodules, with bd36494 providing the feature flag approach and the later bfa6bdb providing a config file based approach. I'd been adding a |
We can't have this option in the config file because the config file is parsed after the clone step. And we don't have the submodules option on the web because we are moving all per-version settings to the config only, all per-project settings will be available on the web. |
Oh, of course 🤦 I guess web UI is the way to go so, though I'm not sure where to nestle that in. |
Feature flag is the way to go. Admin option is overkill I'd say. I don't expect to have this problem too often. |
See above. I've a pull request which should resolve this using the feature flag. |
Weird idea: I think that in the future we could do a simple/plain first clone of the repo to get the config file and make more decisions after parsing the YAML file (like running another |
@humitos I was thinking that we can use the providers API to fetch only the yaml, I think Travis does that. |
Add temporary method for disabling shallow cloning (#5031)
This adds a project feature that allows us to use a standard clone and fetch rather than the shallow clone/fetch introduced in #4939. Eventually we should move this to the web UI, but doing so requires some work to make sure, for example, that git options are only show when 'Project.repo_type' is 'git'. Signed-off-by: Stephen Finucane <stephen@that.guru>
This is now deployed behind a feature flag, if anyone needs this functionality, just ask an admin. |
How does one do this? I'd like this enabled for git-pw.readthedocs.io and patchwork.readthedocs.io, and I've been told by colleagues that infrared.readthedocs.io is also broken. |
@stephenfin done for
|
Is that the final decision? I think anyone who includes Git commit info in their docs using something like I understand prioritizing other work - but this seems like it represents a lot of ongoing maintenance work for support, and also is confusing to users IMO. |
For anyone stumbling onto this issue, you can now add extra steps in the https://docs.readthedocs.io/en/latest/build-customization.html#unshallow-git-clone |
Details
Expected Result
The build, which utilizes the
reno.sphinxext
module, should work.Actual Result
The build fails due to missing tags. These are presumably missing due to the shallow cloning of repos introduced in #4939.
Additional Information
The original issue that #4939 purported to resolve was #1888, Optional use of shallow clone for git repos (emphasis mine). While shallow clone might be useful at large, it should be possible to disable it for projects that rely on git history to build their docs.
The text was updated successfully, but these errors were encountered: