New issue
Advanced search Search tips
Starred by 8 users

Issue metadata

Status: Released
Owner:
Closed: Feb 1
Components:



Sign in to add a comment
link

Issue 10210: Wrong order in the project list

Reported by luca.mil...@gmail.com, Dec 21 Project Member

Issue description

*****************************************************************
*****                                                       *****
***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!  *****
*****                                                       *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD,  *****
***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.*****
*****                                                       *****
*****   THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS     *****
*****                                                       *****
*****************************************************************

Affected Version: 2.16

What steps will reproduce the problem?
1. Create four projects named alpha, beta, charlie, delta

What is the expected output?
The project list in Gerrit has always a consistent ordering (alphabetical for any version <= 2.15)

What do you see instead?
The project list is in apparently random order on PolyGerrit (/admin/repos) while it is fine on the Old UI (/#/admin/projects/)

Please provide any additional information below.
Even if this seems a UI-related problem, in reality the payload is returned in random order by the backend project list API.

Old UI invokes:
GET /projects/?m=&n=101&type=ALL&d

PolyGerrit UI invokes:
curl /projects/?n=26&S=0&query=state%3Aactive%20OR%20state%3Aread-only
 

Comment 1 by luca.mil...@gmail.com, Dec 21

Project Member
Found the offending change:
https://gerrit-review.googlesource.com/c/gerrit/+/114734

Apparently, the old UI and new UI are using two completely different API, which unfortunately are both mapped to the same URL path.

The old API works and returns the elements in the right order. The new API does not respect any order.

Comment 2 by david.pu...@gmail.com, Dec 21

How is the internal project api working? We have tests on the order of the results and they all pass.

Comment 3 by luca.mil...@gmail.com, Dec 21

Project Member
That's the point: there are zero tests on the offending change, which was pushed, reviewed (1h without comments) and merged very quickly.

Going to add more tests now as we speak.

BTW the documentation of the feature was incorrect also.

Comment 4 by luca.mil...@gmail.com, Dec 21

Project Member
Found another change (https://gerrit-review.googlesource.com/c/gerrit/+/116370) where tests have been added. However, the tests are incomplete and do not check the consistency of the results.

Going to fix the code *and* the tests associated with it.

Comment 5 by david.pu...@gmail.com, Dec 21

OK, I've just seen those changes.  I didn't realise this was an index issue, thought it was the project list endpoint.

Comment 6 by david.pu...@gmail.com, Dec 21

Status: Started (was: New)

Comment 7 Deleted

Comment 8 by luca.mil...@gmail.com, Dec 22

Project Member
Status: ChangeUnderReview (was: Started)
Fixed on master with:
https://gerrit-review.googlesource.com/c/gerrit/+/208642

Workaround for the unfiltered list with:
https://gerrit-review.googlesource.com/c/gerrit/+/208712

Comment 9 by david.os...@gmail.com, Jan 9

Project Member
Status: New (was: ChangeUnderReview)

Comment 10 by luca.mil...@gmail.com, Jan 9

Project Member

Comment 11 by luca.mil...@gmail.com, Feb 1

Project Member
Labels: FixedIn-2.16.4
Status: Released (was: New)

Sign in to add a comment