Opened 8 years ago

Closed 8 years ago

#2175 closed undecided (fixed)

Wrong ordering of next builds in the waterfall display?

Reported by: iustin Owned by:
Priority: patches-accepted Milestone: undecided
Version: 0.8.5 Keywords:
Cc:

Description

Hi,

I'm not entirely sure but I think there's a cosmetic bug in the waterfall display. I have some periodic builders and this is how the display looks:

waiting
next in ~ 18 hrs 56 mins at 08:00
next in ~ 2 hrs 56 mins at 16:00
next in ~ 10 hrs 56 mins at 00:00 

For another builder, it is:

waiting
next in ~ 20 hrs 56 mins at 10:00
next in ~ 4 hrs 56 mins at 18:00
next in ~ 12 hrs 56 mins at 02:00 

Normally I would expect these to be sorted in terms of start time, and not somewhat random (I can't find the logic here).

I think this is due to the fact that in waterfally.py, the code does:

for t in upcoming:
    if t is not None:
        eta = t - util.now()
        text.extend(self.formatETA("next in", eta))

without ordering the upcoming list beforehand. Simply changing this to:

for t in sorted(upcoming):
  …

fixes the display for me, but I don't know if the upcoming list will always hold just integers so that sort makes sense.

Change History (1)

comment:1 Changed 8 years ago by Iustin Pop

  • Resolution set to fixed
  • Status changed from new to closed

Sort next builds in waterfall

Fixes #2175.

Changeset: 8e8e43e38c93bc6ad5c3dcd2f11231690c332d6b

Note: See TracTickets for help on using tickets.