Hello,
It seems that Copr API v3 no longer sorts the result array. For example, I expect https://copr.fedorainfracloud.org/api_3/build/list/?ownername=lantw44&pr... to return an array of 'items' sorted by 'id', but instead, it returns a result which I can't understand how it is sorted:
"id": 855774, "id": 798132, "id": 746031, "id": 786267, "id": 786713, "id": 861866, "id": 787056, "id": 783455, "id": 798340, "id": 859005,
Is it an expected behavior? I don't want to request all data and sort myself. It is slow and the only thing I need is the version number of the latest build.
On Monday, July 22, 2019 4:03:55 PM CEST 藍挺瑋 wrote:
It seems that Copr API v3 no longer sorts the result array. For example, I expect https://copr.fedorainfracloud.org/api_3/build/list/?ownername=lantw44&pr... to return an array of 'items' sorted by 'id', but instead, it returns a result which I can't understand how it is sorted:
"id": 855774, "id": 798132, "id": 746031, "id": 786267, "id": 786713, "id": 861866, "id": 787056, "id": 783455, "id": 798340, "id": 859005,
Is it an expected behavior? I don't want to request all data and sort myself. It is slow and the only thing I need is the version number of the latest build.
Thanks for the report. I think this is already solved in git master branch [1], so it will be fixed in production after release (soon to happen).
https://pagure.io/copr/copr/c/51681b4c228a52468fe100faca898067bbb0d7b3
Pavel
copr-devel@lists.stg.fedorahosted.org