Closed
Bug 1223042
Opened 9 years ago
Closed 7 years ago
Old revisions of android tests were scheduled
Categories
(Infrastructure & Operations Graveyard :: CIDuty, task, P1)
Infrastructure & Operations Graveyard
CIDuty
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: catlee, Unassigned)
References
Details
Something happened this morning to make us schedule jobs from last week for 'Android 4.3 armv7 API 11+' jobs. We have about 20,000 extra jobs that shouldn't have been scheduled.
Here's the query I'm using to try and fix it:
update buildrequests set complete=1, results=2, complete_at=1447086265 where buildrequests.id in (select buildrequests.id from buildsets, sourcestamp_changes, changes where changes.changeid = sourcestamp_changes.changeid and sourcestamp_changes.sourcestampid = buildsets.sourcestampid and buildrequests.buildsetid = buildsets.id and buildrequests.complete = 0 and buildrequests.claimed_at =0 and buildername like 'Android 4.3 armv7 API 11+%' and when_timestamp < 1447081200);
Reporter | ||
Comment 1•9 years ago
|
||
that was taking ages, so I did this instead:
create temporary table ids select buildrequests.id from buildrequests, buildsets, sourcestamp_changes, changes w
here changes.changeid = sourcestamp_changes.changeid and sourcestamp_changes.sourcestampid = buildsets.sourcestampid an
d buildrequests.buildsetid = buildsets.id and buildrequests.complete = 0 and buildrequests.claimed_at =0 and buildernam
e like 'Android 4.3 armv7 API 11+%' and when_timestamp < 1447081200;
update buildrequests, ids set complete=1, results=2, complete_at=1447086265 where buildrequests.id=ids.id and co
mplete=0 and claimed_at=0;
Reporter | ||
Comment 2•9 years ago
|
||
Ok, cleaned up the mess....
I wonder if there's something we can do to prevent this from happening again. Perhaps refusing to schedule jobs for changes more than X hours old?
Severity: blocker → major
Comment 4•9 years ago
|
||
alin
puppet/modules/buildmaster/manifests/db_maintenance.pp is a good reference for the puppet config that creates the scripts that clean the dbs of old jobs
Comment 5•9 years ago
|
||
Is there any database, where we can test the script ?
Comment 6•9 years ago
|
||
Well, we don't really want to test the script on the production databases. I don't think there is a staging version of the buildbot scheduler db. What you could do look sql that the changes to the script generates and see if the entries it wants to mark as complete are sane.
Comment 7•7 years ago
|
||
I think we can close this since we've gotten Android off of BB.
Please feel free to re-open if I'm wrong.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Release Engineering → Infrastructure & Operations
Updated•5 years ago
|
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•