-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fails to fetch tags when initializing the repository for ReadtheDocs build #10923
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
Comments
Hi, this case should already be supported with #10738. Looks like your project hasn't triggered a build in a while, so it hasn't caught up with that change. In order to fix this, you'll need to re-sync your versions, this is done automatically after clone, but since your project fails in that step, the sync never happens. I have manually triggered a sync for your project, you should be able to use the new tag now. For users hitting this, you can solve it by triggering a build of an existing version (this will re-sync your versions to use the proper version type for latest). After that you should be able to trigger a build for latest. I'll see if we can detect all projects hitting this to trigger a re-sync for those. |
@stsewd Thanks a lot! It does work now for nnabla project. But I'm sorry that I missed another project, which is https://readthedocs.org/projects/nnabla-nas/. The failed build is https://readthedocs.org/projects/nnabla-nas/builds/22677816/. It's now facing the same problem. Could you please manually triggered a sync for this project again? Thank you so much! |
@Qizhen-Xue you can solve this by triggering a build on an existing version, but looks like you already did that Your problem should be solved |
Thank you for your information again! I do expect this trigger could solve my problem but it didn't work at the beginning. Now after further investigation, I found that it will only works after I trigger a build with both default version and default branch to be So currently this project has no problem and don't need a manual trigger anymore. But I think the mechanism is kinda obscure for the user. |
Details
Expected Result
Our project is using Tags to manage the release version. Previously before ReadtheDocs version update, the default git command will clone the whole repository and then checkout to the corresponding commit. At that time it all works fine.
After the recent ReadtheDocs update, we expect that the repository could fetch the corresponding tag with the default git command.
Actual Result
The fetch fails due to git fetch command error.

Suggested feature or behaviour
In my point of view, the fetch command should be
git fetch origin --force --prune --prune-tags --depth 50 refs/tags/v1.37.0:refs/remotes/origin/v1.37.0
.refs/heads
should be replaced byrefs/tags
.I also noticed that the git commands are changed in #10430. Actually it does have an option to fetch tags, where is
readthedocs.org/readthedocs/vcs_support/backends/git.py
Line 150 in 12305ba
However, I could not find a way to define
version_type
andverbose_name
by myself. I also tried to set the environment variable toREADTHEDOCS_VERSION_TYPE
to betag
. But it's not allowed to set such an variable start with READTHEDOCS.@humitos , sorry it might bother your work. But do you have any opinion that I could set my build job's version_type to be tag? Or if you have any other solution for this issue, please kindly give me some suggestion. I'm not sure if this problem is a bug or not. If so, I believe there should be many other projects would meet the same error. I've seen #10915, but it's not quite the same situation as it's not using tags to manage the release version. Now our release process is just in progress and blocked by this document build failure. Thanks for any help!
The text was updated successfully, but these errors were encountered: