Edgewall Software
Modify

Opened 17 years ago

Closed 15 years ago

Last modified 15 years ago

#262 closed defect (fixed)

Steps completed at the same time shown in wrong order

Reported by: ebray Owned by: osimons
Priority: minor Milestone: 0.6
Component: General Version: dev
Keywords: Cc:
Operating System:

Description

This is similar to trac:#5153. On build listings the individual steps can be shown in the wrong order if they completed at the same time. This is because they're retrieved via BuildStatus.select() which returns the steps ordered by stop time.

A reasonable temporary fix might be to order the steps by start time instead:

  • model.py

     
    654654            where = ""
    655655
    656656        cursor = db.cursor()
    657         cursor.execute("SELECT build,name FROM bitten_step %s ORDER BY stopped"
     657        cursor.execute("SELECT build,name FROM bitten_step %s ORDER BY started"
    658658                       % where, [wc[1] for wc in where_clauses])
    659659        for build, name in cursor:
    660660            yield BuildStep.fetch(env, build, name, db=db)

This fixes the problem in my case. But one could also probably create a case where two steps started at the same second. A long term solution would be to find a way to ensure that steps are always ordered according to their order in the build recipe.

Attachments (1)

stepno.diff (6.2 KB) - added by hodgestar+bitten@… 15 years ago.
Patch that adds a stepno field to Build Step?.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 15 years ago by osimons

  • Milestone set to 0.6
  • Owner changed from cmlenz to osimons

In [702] I've included a fix for this - slave basically halts for 1 second if previous step finished in the same second as the current one. This should ensure that in common usage this issue should no longer arise (for newer builds that is).

comment:2 Changed 15 years ago by osimons

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

...and closing.

Changed 15 years ago by hodgestar+bitten@…

Patch that adds a stepno field to Build Step?.

comment:3 follow-up: Changed 15 years ago by hodgestar+bitten@…

For what it's worth I've attached a patch that adds a stepno field that keeps track of the correct order for build steps. It's missing a database upgrade script and some more thorough testing but I can add those if there is interest in applying the patch.

comment:4 in reply to: ↑ 3 Changed 15 years ago by dfraser

Replying to hodgestar+bitten@…:

For what it's worth I've attached a patch that adds a stepno field that keeps track of the correct order for build steps. It's missing a database upgrade script and some more thorough testing but I can add those if there is interest in applying the patch.

I think it's worth having the stepno included, it's a more complete and reliable solution than the current one.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.