[Buildbot-devel] Buildbot database schema - getting the slavename

John Hopkins john.hopkins at mozillamessaging.com
Mon Jan 17 21:23:08 UTC 2011


[buildbot 0.8.2]

I'd like to be able to trend build times on a per-buildslave basis using 
queries against the buildbot database like this:

SELECT bs.id, br.buildername, (b.start_time - br.submitted_at) 
"queued_for", b.start_time "build_start", (b.finish_time - b.start_time) 
"build_dur",
    (SELECT property_value
     FROM buildset_properties bsp
     WHERE bsp.buildsetid = bs.id
      AND bsp.property_name = 'slavename') "slavename"
FROM buildsets bs, buildrequests br, builds b
WHERE bs.id = br.buildsetid
  AND b.brid = br.id
  AND br.complete = 1
  AND (b.start_time - br.submitted_at) > 1
ORDER BY bs.id DESC
LIMIT 20;

A major problem I've run into is that the 'slavename' property is only 
set for a small fraction of buildsets, so from what I can tell, for most 
builds there is no way to know which build slave it was run on (using 
only the database).

I'm also wondering if the slavename should be set further down the table 
hierarchy - at the "builds" or "buildrequests" level.

Thanks in advance for your input,

John




More information about the devel mailing list