On Tue, Aug 04, 2009 at 01:09:14PM +0200, Philipp Kern wrote: > I'm grateful for those suggestions, Anthony. That page is just a pain > to maintain though. Not everything on it is up-to-date yet but I updated > quite some chunks.
So make it easy to maintain... Attached is an example converting it to yaml with python table generation, coping with waivers. I've made it automatically classify any arch with any failures as "at risk", rather than letting it remain listed as a candidate. It'd probably be better to have any warnings imply "at risk" and any failures come pretty close to meaning "no", though... Anyway, have a look, see what you think. It'd be really nice to have all the buildd criteria be measurable (and then automated). One idea might be to change "fast security" and "redundancy" into speed/load measures, something like: alpha amd64 armel s390 buildd-speed 95% 100% 50% 113% (%ge of i386/amd64) buildd-load 55% 60% 95% 20% n-buildds 2 3 6 1 idle-buildds 0.9 1.2 0.3 0.8 where speed is calculated as the overall average of: time-to-build-on-$ARCH / time-to-build-on-i386/amd64 (ie, dpkg takes 20s to build on alpha, versus 13s to build on i386 after and amd64+source upload would give 154%) load is the percentage of time on average that each buildd is actually building something, and idle-buildds is "n-buildds * (1 - buildd-load)". Release criteria are then something like "buildd-speed >= 50%", "idle-buildds >= 1". Cheers, aj
#!/usr/bin/env python # Copyright (c) 2009 Anthony Towns # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. import sys, yaml ########################################################### formatting helpers def FAIL(value): return ("red",value) def WARN(value): return ("yellow",value) def PASS(value): return ("lime",value) def c_truth(value): if value == True: return PASS("yes") elif value == False: return FAIL("no") else: return WARN(value) def c_untruth(value): if value == True: return FAIL("yes") elif value == False: return PASS("no") else: return WARN(value) def c_host(value): if not value: return FAIL("none") return PASS('<a href="http://db.debian.org/machines.cgi?host=%s">yes</a>'%(value)) def c_list(maybe,okay): def c_list_f(value): n=len(value) str='<acronym title="%s">%s</acronym>' % (", ".join(value),n) if n < maybe: return FAIL(str) if n >= okay: return PASS(str) return WARN(str) return c_list_f def c_num(maybe,okay): def c_list_f(value): if value < maybe: return FAIL(value) if value >= okay: return PASS(value) return WARN(value) return c_list_f def c_str(value): if not value: return FAIL("-") return PASS(value) ##################################################################### criteria criteria = [ ("available", c_truth), ("portbox", c_host), ("porters", c_list(2,5)), ("users", c_num(30,50)), ("installer", c_str), ("archive-coverage", c_num(90,95)), ("archive-uptodate", c_num(95,97)), ("buildds", c_list(2,2)), ("buildd-redundancy", c_truth), ("buildd-fast-sec", c_truth), ("buildd-247", c_truth), ("concerns-rm", c_untruth), ("concerns-srm", c_untruth), ("concerns-dsa", c_untruth), ("concerns-sec", c_untruth), ("candidate", c_truth), ] ################################################################# table output def dump_table(info,waivers): arches=info.keys() arches.sort() candidacy_at_risk = {} print "<table>" print "<tr><td></td>" for arch in arches: print "<td>%s</td>" % (arch) candidacy_at_risk[arch] = False print "</tr>" for c,c_fn in criteria: print "<tr><td>%s</td>" % (c) for arch in arches: v=info[arch].get(c,None) if c=="candidate" and candidacy_at_risk[arch]: if v == True: v = "at risk" if v is not None: col,contents = c_fn(v) else: col,contents = FAIL("-") w = waivers.get(arch,{}).get(c,None) if w: col="cyan" contents += ' <a href="%s">(w)</a>' % (w) if col=="red": candidacy_at_risk[arch]=True print '<td bgcolor="%s">%s</td>' % (col,contents) print "</tr>" print "</table>" ######################################################################### main def main(argv): if len(argv) < 2 or argv[1] == "-h": print "Usage: %s <arch-spec.yaml> [<waivers-spec.yaml>]" % argv[0] sys.exit(1) info = yaml.load(open(argv[1])) if len(argv) >= 3: waivers=yaml.load(open(argv[2])) else: waivers={} dump_table(info,waivers) if __name__ == "__main__": main(sys.argv)
alpha: available: yes portbox: albeniz porters: - Steve Langasek users: 50 installer: d-i archive-coverage: 96 archive-uptodate: 98 buildds: - goetz - goedel buildd-redundancy: no buildd-fast-sec: yes buildd-247: yes concerns-rm: no concerns-srm: no concerns-dsa: no concerns-sec: no candidate: at risk amd64: available: yes portbox: pergolesi porters: - Kurt Roeckx - Frederik Schuler users: 50 installer: d-i archive-coverage: 99 archive-uptodate: 99 buildds: - nautilus - brahms - excelsior buildd-redundancy: yes buildd-fast-sec: yes buildd-247: yes concerns-rm: no concerns-srm: no concerns-dsa: no concerns-sec: no candidate: yes armel: available: yes portbox: agricola users: 45 installer: d-i archive-coverage: 97 archive-uptodate: 99 buildd-redundancy: yes buildd-fast-sec: no buildd-247: yes concerns-rm: no concerns-srm: no concerns-dsa: no concerns-sec: no candidate: yes
amd64: porters: http://popcon.debian.org/stat/submission.png