Skip to content

"Default branch: latest" does not exist #5390

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

Closed
humitos opened this issue Mar 4, 2019 · 12 comments · Fixed by #5547
Closed

"Default branch: latest" does not exist #5390

humitos opened this issue Mar 4, 2019 · 12 comments · Fixed by #5547
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@humitos
Copy link
Member

humitos commented Mar 4, 2019

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.

@humitos humitos added Bug A bug Accepted Accepted issue on our roadmap labels Mar 4, 2019
@saadmk11
Copy link
Member

saadmk11 commented Mar 4, 2019

@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.

@stsewd
Copy link
Member

stsewd commented Mar 4, 2019

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

@stsewd
Copy link
Member

stsewd commented Mar 4, 2019

I think the related issue is because of #5358

@stsewd
Copy link
Member

stsewd commented Mar 27, 2019

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.

@stsewd
Copy link
Member

stsewd commented Mar 27, 2019

The extra origin issue is fixed in #5523

@stsewd
Copy link
Member

stsewd commented Mar 27, 2019

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

@humitos
Copy link
Member Author

humitos commented Mar 27, 2019

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?

@stsewd
Copy link
Member

stsewd commented Mar 27, 2019

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

@humitos
Copy link
Member Author

humitos commented Mar 28, 2019

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

@stsewd
Copy link
Member

stsewd commented Mar 28, 2019

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.

@saadmk11
Copy link
Member

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 👍

@humitos
Copy link
Member Author

humitos commented Mar 28, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants