Update how to restart builds

[?]
Jan 28, 2013, 5:53 PM
LFZOBIYZIQMGF6SSYCVUVA2FQQ7SNT3QLLQ6AHNASHBD4NZF5EJQC

Dependencies

  • [2] AHTEIK7G * Added a maintainers field to the Builds table.
  • [3] UUGBVEGY * Development notes.
  • [4] 4D4U5IPY * Allow jobsets to be disabled.
  • [5] P5X4P6VK * Renaming "release sets" to "views" (not finished yet). Having

Change contents

  • replacement in doc/dev-notes.txt at line 123
    [3.4669][3.4669:4708]()
    * Restarting a bunch of failed builds:
    [3.4669]
    [3.4708]
    * Restart all aborted builds in a given evaluation (e.g. 820909).
  • replacement in doc/dev-notes.txt at line 125
    [3.4709][3.4709:4970]()
    $ sqlite3 hydra.sqlite "select x.id from builds x join buildresultinfo r on r.id = x.id where project = 'nixpkgs' and jobset = 'stdenv' and exists (select 1 from buildinputs where build = x.id and revision = 14806) and finished = 1 and buildstatus = 3" > ids
    [3.4709]
    [3.4970]
    > update builds set finished = 0 where id in (select id from builds where finished = 1 and buildstatus = 3 and exists (select 1 from jobsetevalmembers where eval = 820909 and build = id));
  • edit in doc/dev-notes.txt at line 127
    [3.4971][3.4971:5250]()
    $ for i in $(cat ids); do echo $i; sqlite3 hydra.sqlite "begin transaction; insert into buildschedulinginfo (id, priority, busy, locker) values($i, 100, 0, ''); delete from buildresultinfo where id = $i; update builds set finished = 0 where id = $i; commit transaction;"; done
  • edit in doc/dev-notes.txt at line 128
    [2.120][2.120:140](),[2.140][3.5250:5251](),[3.5250][3.5250:5251](),[3.5251][2.141:380](),[2.380][3.5251:5252](),[3.5251][3.5251:5252](),[3.5252][2.381:715]()
    Or with Postgres:
    (restarting all aborted builds with ID > 42000)
    $ psql -h buildfarm.st.ewi.tudelft.nl -U hydra hydra -t -c 'select x.id from builds x join buildresultinfo r on r.id = x.id where finished = 1 and buildstatus = 3 and x.id > 42000' > ids
    $ for i in $(cat ids); do echo $i; PGPASSWORD=... psql -h buildfarm.st.ewi.tudelft.nl -U hydra hydra -t -c "begin transaction; insert into buildschedulinginfo (id, priority, busy, locker) values($i, 100, 0, ''); delete from buildresultinfo where id = $i; update builds set finished = 0 where id = $i; commit transaction;"; done