readthedocs.org: Shallow clone breaks build

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.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Feature flag is the way to go. Admin option is overkill I’d say. I don’t expect to have this problem too often.

Is that the final decision? I think anyone who includes Git commit info in their docs using something like sphinx-git will hit this problem. Moreover, it’s a time bomb. Builds will work fine for a while, then one day, once commits you are referencing have fallen out of the shallow clone, builds will start failing, complaining that commit hashes you’re referring to can’t be found.

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.

@stephenfin done for git-pw, patchwork and infrared. Please, if you have any issue open a new one to continue the discussion there. Thanks!

I triggered a build manually in git-pw and it worked 😉

This is now deployed behind a feature flag, if anyone needs this functionality, just ask an admin.

For anyone stumbling onto this issue, you can now add extra steps in the .readthedocs.yaml file to get an unshallow clone:

https://docs.readthedocs.io/en/latest/build-customization.html#unshallow-git-clone

@stsewd I think we should add a Feature flag for these cases to omit shallowing.