Closed pacospace closed 2 years ago
Hi @pacospace. I have seen this issue before and it pops up only for some packages. The issue is that sometimes the packages are stored in order and sometimes they are not. Previously, to get around this, I would iteratively fetch each page of data and then sort it on the frontend. Depending on the amount of versions available, this could slow down the ui.
The fix I would recommend would be on User API or even storages: to presort the data.
But a quick and dirty fix on the front is what's described above: fetch each page and then sort.
Note: version's endpoint is pagenated with a max page size of 100 version entries.
Hi @pacospace. I have seen this issue before and it pops up only for some packages. The issue is that sometimes the packages are stored in order and sometimes they are not. Previously, to get around this, I would iteratively fetch each page of data and then sort it on the frontend. Depending on the amount of versions available, this could slow down the ui.
The fix I would recommend would be on User API or even storages: to presort the data.
But a quick and dirty fix on the front is what's described above: fetch each page and then sort.
Note: version's endpoint is pagenated with a max page size of 100 version entries.
thanks @Gkrumbach07 for the comment and proposed solutions! I see there is no sort in the query for package versions here in the method in User-API: https://github.com/thoth-station/user-api/blob/b96280a57010a46481265e63b066883987d6dfc0/thoth/user_api/api_v1.py#L735, it needs some new logic indeeed on the backend side.
Can you please open a feature request in User-API in that case then? so we can discuss there with @fridex also.
Can you please open a feature request in User-API in that case then? so we can discuss there with @fridex also.
Sure thing! I believe this will be an excellent feature moving forward for UI.
In the meantime do you want the quick fix implemented?
Can you please open a feature request in User-API in that case then? so we can discuss there with @fridex also.
Sure thing! I believe this will be an excellent feature moving forward for UI.
In the meantime do you want the quick fix implemented?
I think we can wait a bit, it is not critical.
/priority important-soon
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
/close
@sesheta: Closing this issue.
Describe the bug constraints versions of packages are not ordered
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots![Screenshot from 2022-02-17 17-23-12](https://user-images.githubusercontent.com/27498679/154525078-7981837a-17df-474c-a057-785f2eeb01ba.png)
Environment information
Stack information
Additional context