The "Jobset" page now shows when evaluations are in progress (rather than just pending).
Restored the ability to do a single evaluation from the command line by doing "hydra-evaluator <project> <jobset>".
Fix some consistency issues between jobset status in PostgreSQL and in hydra-evaluator. In particular, "lastCheckedTime" was never updated internally.
W4G5MZZSCK7VGSZJQKLS6XMQPFDIL7D542XWDMFMO4RZEO4FQB2QC
7XOH2DGH3W4B7BJWCXDP673R5R7TQGLCNTHJT7IZUSBVQWYWJUHQC
CCIORPJ5SKP5EVW4FXNDS7U7MXD3ZK65XRVBWI5QBJGETMQRPZUQC
ZM6WYVL7JYY5JADLSZADG6TO45M77JF54HJ5RMLMLSHUPCMT2TFQC
OPQLMRPURAYCL26XY2OAKH7GJ3QTQVGFQEHMJY2PPJ2GL22S2Z5QC
KMPLMG7TDEVQVZGRXQKG66G6P7LUDELSKRFUO557PQ4WZQI3SBAQC
D3MDJONYWWNXVVZDKTPDQE2H2HGMF263LXKT57B2GYCOXNM3PPOQC
4YCF3KBGI4VYKHJXAREJLCJLY3UWB2FX447CJ4XQWFRKRFKG5WCQC
PYTVXHMHRZ4XSGVJOBZPFSQAOTNVCCOLJUFXZMJBLPJWQVYRNKLAC
QTC3SYBMNNTPZHQGXRMV5GU5KDODGXPIM3TIGWBAF7HDKNDKTCXQC
GEADFVZ5LXXFIE3VIP4UJ4AEI2VX57DXER47JA4IHH5BG3QNPAEAC
3HZY24CX4U2TO74HOY4YX3LBJIYF4DLXHCIY7J2RASAC4COMSMZAC
SS4TZXNUWXSEJC3XYHGVS3IBZ2D7GPIPELODVQOHRRGYADI2L72AC
X27GNHDV5KPZ5GSH6DCAJMNCEMZLCP7M43JWF2X3O5QWXMOX273AC
SB2V735VJ2CDHGCXRUA5FOYHDRXQFVOZ3KXC3YKXWRNW6DIX7RXQC
W5OAZWPDZOGVAL5P4ROVZSZGCSJBMPRALW6SCGV6L7A5DBAK2JLQC
TFK74CQRYCOR2RAUZ6LATA3IJVR7QCWSPCMTXCJPPDPIRS7D5UTQC
6LETVKRAATQS7Z63ED6FD3IMGLYIEDBQ55DAWHTMTGAFLOTC4PMQC
ODNCGFQ5FPKFI624BVMLW7PJ2EFJOR3TY66OCZM42UNNTWBCF2TQC
WQXF2T3DFC2K72OVX46TUQ4IMZNJ5BSBQ7L7AVI7QL54DXCBEKLQC
OVR2RWBIUXNW2XSG63KFL2S3Q7UVTLHOEYO3573LZBY7AMLUKKTQC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
J74UTA3I7FHYJBO7FZMTQ3AQTZPD36DD7RFVGJHLHLOZ5YBPNONQC
PCKLFRT5IZVLG47GQQ23GBSROKUR4CUEZW4PRVGREHNDFTCZ7VBAC
RXVJFQ5AV3WME4HDVBPSRCALQTXROT4KQPOQVO6KTWTBNZIZZGPAC
53PW36WSP3WZOGHI4OSMX2I26O32WWZOZJH3B2W67JZMRKAOWTXAC
WVD3YYON22ES6LFQTX7LYBXTEBERGIN2DHOJC6M36UJ4KS4IHS2QC
LLAJKVGIFUSYN24LSSJMXB742HZL7455B5MMAHUQAVBSM3AZCOFQC
D5QIOJGPKQJIYBUCSC3MFJ3TXLPNZ2XMI37GXMFRVRFWWR2VMTFAC
printInfo("starting evaluation of jobset ‘%s:%s’", jobset.name.first, jobset.name.second);
time_t now = time(0);
printInfo("starting evaluation of jobset ‘%s:%s’ (last checked %d s ago)",
jobset.name.first, jobset.name.second,
now - jobset.lastCheckedTime);
{
auto conn(dbPool.get());
pqxx::work txn(*conn);
txn.parameterized
("update Jobsets set startTime = $1 where project = $2 and name = $3")
(now)
(jobset.name.first)
(jobset.name.second)
.exec();
txn.commit();
}
time_t now = time(0);
{
auto conn(dbPool.get());
pqxx::work txn(*conn);
txn.parameterized
("update Jobsets set lastCheckedTime = $1, triggerTime = null where project = $2 and name = $3")
(now)
(jobset.name.first)
(jobset.name.second)
.exec();
txn.commit();
jobset.lastCheckedTime = now;
jobset.triggerTime = notTriggered;
}
if (i->second.pid == -1 &&
(i->second.triggerTime != std::numeric_limits<time_t>::max() ||
(i->second.checkInterval > 0 && i->second.lastCheckedTime + i->second.checkInterval <= now)))
if (evalOne ||
(i->second.pid == -1 &&
(i->second.triggerTime != std::numeric_limits<time_t>::max() ||
(i->second.checkInterval > 0 && i->second.lastCheckedTime + i->second.checkInterval <= now))))
auto conn(dbPool.get());
pqxx::work txn(*conn);
/* Clear the trigger time to prevent this
jobset from getting stuck in an endless
failing eval loop. */
txn.parameterized
("update Jobsets set triggerTime = null where project = $1 and name = $2 and startTime is not null and triggerTime < startTime")
(jobset.name.first)
(jobset.name.second)
.exec();
/* Clear the start time. */
txn.parameterized
("update Jobsets set startTime = null where project = $1 and name = $2")
(jobset.name.first)
(jobset.name.second)
.exec();
$c->stash->{latestEval} = $c->stash->{jobset}->jobsetevals->search({}, { rows => 1, order_by => ["id desc"] })->single;
$c->stash->{latestEval} = $c->stash->{jobset}->jobsetevals->search({ hasnewbuilds => 1 }, { rows => 1, order_by => ["id desc"] })->single;
# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-10-24 20:12:51
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PSR66NnVRNTMFhDEm10erA
# Created by DBIx::Class::Schema::Loader v0.07045 @ 2017-03-09 13:03:05
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ivYvsUyhEeaeI4EmRQ0/QQ
print STDERR "considering jobset ", $jobset->project->name, ":", $jobset->name,
$jobset->lastcheckedtime
? " (last checked " . (time() - $jobset->lastcheckedtime) . "s ago)\n"
: " (never checked)\n";
my $triggerTime = $jobset->triggertime;
}
if (defined $triggerTime) {
txn_do($db, sub {
# Only clear the trigger time if the jobset hasn't been
# triggered in the meantime. In that case, we need to
# evaluate again.
my $new = $jobset->get_from_storage();
$jobset->update({ triggertime => undef })
if $new->triggertime == $triggerTime;
}) if !$dryRun;
alter table Jobsets add column startTime integer;