-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Take preferece of tags over branches when selecting the stable version #3331
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
Conversation
This allows us to have the same `verbose_name` for different type of versions (for example, '2.0' could both a tag and a branch). If this happen, we want to keep them both. In the UI, it will say just `"2.0"` for the branch and `"2.0 (c0d25453)"` for the tag. This could be improved later if necessary.
I just updated this PR with more logic on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@ericholscher I found another place where this PR is kind of related, can you check my commet at #3268 (comment) and give your opinion? |
Now, this logic is like this: - if the project has any Version that is a TAG, the highest version will only be a TAG also (BRANCH are not considered) - if the project doesn't have any TAG the highest version will be a BRANCH (or UNKNOWN in the worst case)
I just added one more commit here to follow what it was suggested in the comment and some tests for these scenarios at: bcfbca88 Can you please re-review? :) |
Ah yea -- the "version checking" code that is super old and janky :) |
That commit looks good! <3 getting these bugs fixed. |
Thanks @humitos 👍 |
Should be deployed. |
I changed a couple of things here.
Let me know if you dislike this from this PR and I will remove them.
The interesting commit with the new logic to take a look is fd0b406
I will add more tests for this new logic.
Closes #3268