Readthedocs.org: "Default branch: latest" does not exist

Created on 4 Mar 2019  路  12Comments  路  Source: readthedocs/readthedocs.org

Going to Advanced settings the Default branch selector shows latest as an option. I think this is invalid since the repo has no latest branch: https://github.com/rtfd/test-builds/branches/all?utf8=%E2%9C%93&query=latest

In this particular project seems that this is not a real problem, since the build that was triggered after saving it to this branch picked the origin/master anyway but I saw other projects failing for this (in the corporate site).

Anyway, latest should not be an option since it's not a valid branch on the repository.

Accepted Bug

All 12 comments

@humitos I went Through the Code for this. it seems like we are creating a duplicate version for LATEST an STABLE

screenshot from 2019-03-05 00-34-44

and in the forms we are showing all the Versions as the default_branch choices
https://github.com/rtfd/readthedocs.org/blob/c428dd336992fd8716fc53180b626ba7925ba9b1/readthedocs/projects/forms.py#L231-L241

so should we remove latest and stable from the choices as they are not valid branch ?
if I'm Wrong please let me know how it should be handled.

The project has a latest version https://readthedocs.org/projects/test-builds/versions/, it points to master. That version we create automatically.

I think the related issue is because of https://github.com/rtfd/readthedocs.org/issues/5358

Also, I think of this more like an alias. Actually the name is incorrect, it should be "default version" (but we already use that name for another setting!).

I say this because, it can be a tag too.

The extra origin issue is fixed in https://github.com/rtfd/readthedocs.org/pull/5523

I propose _re-propossing_ this issue to change the name of this setting to something more accurate p:

If a project doesn't have a _branch_ or _tag_ called latest and you select Default branch: latest from the admin, does not fail the build when triggering latest?

With the current PR no, it's doesn't. A build is triggered to master or whatever alias was used

OK. I still think that latest should not appear there, but not failing is better than what we have now :)

Yeah, latest shouldn't be there. What do you think about including stable? I think neither should be listed there (actually they should if the user put those branches/tasg)., we should filter for machine=False I think.

Yeah, latest shouldn't be there. What do you think about including stable? I think neither should be listed there (actually they should if the user put those branches/tasg)., we should filter for machine=False I think.

I was proposing something like this on my initial response. I think this is a good way to go :+1:

@stsewd yeah, stable shouldn't be there either. Filtering by machine=False looks good to me :+1:

Was this page helpful?
0 / 5 - 0 ratings