-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Hacs tries to downgrade component to beta version #2233
Comments
Make sure you have read the issue guidelines and that you filled out the entire template. |
I submitted only the logs, which I think are relevant. If you need all of them please let me know. Maybe it#s related to #2203 |
HACS should not do any sorting. |
Then the question is why, is the |
https://api.github.com/repos/And3rsL/Deebot-for-Home-Assistant/releases is what the API returns, which shows |
Oh sorry my fault. I checked it now :) Do you know a way how I can specify the order on the repository? I think it would be great if user will always get the newest version and not a "random" sorted list |
Until GitHub adds a sort param to https://docs.github.com/en/rest/reference/repos#list-releases I don't see that happening. |
Thanks for your help 😊 As always thanks for all your work here and on HA and a nice release party tonight 😂 |
System Health details
System Health
Home Assistant Community Store
Lovelace
Checklist
Describe the issue
Hacs informs the user about an update, but in fact it's a downgrade as you can see in the screenshot.
I started my investigation at the manifest of both version, but they are set correctly. Also the tags are set correctly so it must be a bug in hacs.
During my investigation in the hacs code base (sorry I'm not familiar with the code) I found out, that the function
custom_components.hacs.helpers.functions.information.get_releases
is getting the releases viaaiogithubapi
.The returned list from
aiogithubapi.objects.repository.AIOGitHubAPIRepository.get_releases
is not sorted correctly by semantic versioning.On the specific example of "Deebot-for-Home-Assistant" the returned list included the version in the following order:
3.1.4b3
3.1.4b2
3.2.0
3.1.4b1
I think this is the problem as hacs probably checks only the first entry and shows an update notification if the version don't match.
Please correct me if I'm wrong but this is my assumption and I didn't checked it. (My not familiar with the code and it takes some time to find the correct information)
I had to release a quick bug fix so the update window is showing now the correct version, but if you open the "reinstall" dialog, you can still see that the version are ordered wrong.
Reproduction steps
1a. If you have already selected or installed the integration please click on "Update Information" to fetch the latest information
For Devs:
config.custom_components.hacs.helpers.functions.information.get_releases
on Line 79[releases[0], releases[3], releases[1], releases[2], releases[4]]
Debug logs
The text was updated successfully, but these errors were encountered: