Opened 8 years ago

Last modified 6 years ago

#2402 new defect

Changes lost during migration from 0.7.12 to 0.8.7

Reported by: AndyS Owned by:
Priority: major Milestone: undecided
Version: 0.8.7 Keywords:

Description (last modified by sa2ajj)

I tried to upgrade our buildbot setup from 0.7.12 to 0.8.7 with mysql database backend. After adding DB configuration to master.cfg 'buildbot upgrade-master' ran successfully, no diagnostics was produced. Unfortunately when I checked web interfaces I did not see any changes there. I checked around and this is what I saw:

  • changes.pck in master directory was renamed to changes.pck.old, this probably implies that its content was moved to database
  • in the database table changes was completely empty

I looked at the buildbot source and it seems the culprit is this code in db/migrate/versions/

     # insert the changes
     for c in source.changes:
         if not c.revision:

In our setup we only do manually-controlled builds using the buildbot sendchange command, and for that we do not specify revision numbers as they do not make sense in out setup. As a result revisions in old changes were missing, and the filter in the above code simply discarded all our old changes from changes.pck.

Is there a reason why revision number is required when doing migration of the changes? Is it generally necessary to provide revision to buildbot sendchange?

As a test I tried to comment out the filter in the above code and re-ran upgrade. All changes were successfully copied to database, and I did not observe any problems yet after migration (but after couple of days I had to revert back to 0.7.12 for other reasons so I do not run 0.8.7 at the moment).

Change History (3)

comment:1 Changed 8 years ago by dustin

There's a test specifically checking that changes without a revision are not imported, so surely there was a reason to do this. That was in revision c7d1f0da, which at a glance doesn't give a lot of indication why. This needs a deeper look.

comment:2 Changed 6 years ago by sa2ajj

  • Description modified (diff)

While I understand it was a problem at the time, I wonder if we need to give that deeper look now?

comment:3 Changed 6 years ago by dustin

I think that the utility of buildbot sendchange will be substantially reduced in nine, as changes become what they should be -- a local representation of a change in a version-control system. buildbot force will probably be the more appropriate choice.

Note: See TracTickets for help on using tickets.