#4152 stabilize order for listTagged
Merged 5 months ago by mikem. Opened 8 months ago by mikem.
mikem/koji stabilize-order  into  master

file modified
+3 -1
@@ -1491,7 +1491,9 @@ 

          clauses.append('users.name = %(owner)s')

      if draft is not None:

          clauses.append(draft_clause(draft))

-     queryOpts = {'order': '-create_event'}  # latest first

+     queryOpts = {'order': '-create_event,-id'}

+     # most recently tagged first

+     # in a tie (e.g. two builds tagged at same event), newest build first

      if extra:

          fields.append(('build.extra', 'extra'))

          query = QueryProcessor(columns=[x[0] for x in fields], aliases=[x[1] for x in fields],

It has in the past been possible or two builds to be tagged at the same event, which results in undefined ordering for listTagged. Even though current Koji code shouldn't do this, some instances might have such entries in their history. This stabilizes the order in such cases.

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

7 months ago

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

5 months ago

rebased onto 096a497

5 months ago

Commit 5a46df5 fixes this pull-request

Pull-Request has been merged by mikem

5 months ago