hydra-queue-runner: Make build notification more reliable
[?]
Jul 26, 2017, 1:17 PM
B7ENVLRS2KLKEG66TY5G4EW6M274JZOBDUCRB7BFBXLTBG455STQCDependencies
- [2]
TM6C352UEnsure that stoptime and starttime are set for finished builds - [3]
CHJANKMMIndexJobsetEvalsOnJobsetId: Only index jobsets with new builds - [4]
7LWB2J2ZPeriodically clear orphaned build steps - [5]
YTAYNN7VQueue monitor: Bail out earlier if a step has failed previously - [6]
JPHDKOMJhydra-queue-runner: Keep some notification statistics - [7]
PHX2HIVG* Store info about the build inputs in the build record. - [8]
TPNHTE5VRemove obsolete Builds columns and provide accurate "Running builds" - [9]
UNVMKJV5Unify build and step status codes - [10]
SMUWBAD5Send BuildFinished notifications on cached build results. - [11]
HPEG2RHVMerge the BuildResultInfo table into the Builds table - [12]
5AIYUMTBBasic remote building - [13]
MHVIT4JYSplit hydra-queue-runner.cc more - [14]
62MQPRXCPass null values to libpqxx properly - [15]
5DSF5KWY* Perl sucks. "getBuildLog $drvPath" doesn't mean the same as - [16]
LVQXQIYAKill active build steps when builds are cancelled - [17]
OBOTGFG6Prevent orphaned build steps - [18]
VZCNKQSBRemove superfluous check - [19]
37R34XJO* Negative caching: don't perform a build if a dependency already - [20]
3ZCEPLNO - [21]
24BMQDZAStart of single-process hydra-queue-runner - [22]
HPJKBFZ4Handle concurrent finishing of the same build - [23]
FQQRJUO4Mark builds as busy - [24]
BG6PEOB2Make the output size limit configurable - [25]
FITVNQ2SKeep track of the time we spend copying to/from build machines - [*]
IE2PRAQUhydra-queue-runner: Send build notifications - [*]
N22GPKYT* Put info about logs / build products in the DB. - [*]
D5QIOJGP* Move everything up one directory.
Change contents
- replacement in src/hydra-queue-runner/builder.cc at line 421
("update Builds set finished = 1, buildStatus = $2, startTime = $3, stopTime = $4, isCachedBuild = $5 where id = $1 and finished = 0")("update Builds set finished = 1, buildStatus = $2, startTime = $3, stopTime = $4, isCachedBuild = $5, notificationPendingSince = $4 where id = $1 and finished = 0") - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 417
("update Builds set finished = 1, buildStatus = $2, startTime = $3, stopTime = $4, size = $5, closureSize = $6, releaseName = $7, isCachedBuild = $8 where id = $1")("update Builds set finished = 1, buildStatus = $2, startTime = $3, stopTime = $4, size = $5, closureSize = $6, releaseName = $7, isCachedBuild = $8, notificationPendingSince = $4 where id = $1") - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 522
if (item.type == NotificationItem::Type::BuildFinished) {auto conn(dbPool.get());pqxx::work txn(*conn);txn.parameterized("update Builds set notificationPendingSince = null where id = $1")(item.id).exec();txn.commit();} - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 850
/* Enqueue notification items for builds that were finishedpreviously, but for which we didn't manage to sendnotifications. */{auto conn(dbPool.get());pqxx::work txn(*conn);auto res = txn.parameterized("select id from Builds where notificationPendingSince > 0").exec();for (auto const & row : res) {auto id = row["id"].as<BuildID>();enqueueNotificationItem({NotificationItem::Type::BuildFinished, id});}} - replacement in src/hydra-queue-runner/queue-monitor.cc at line 191
("update Builds set finished = 1, buildStatus = $2, startTime = $3, stopTime = $3, isCachedBuild = 1 where id = $1 and finished = 0")("update Builds set finished = 1, buildStatus = $2, startTime = $3, stopTime = $3, isCachedBuild = 1, notificationPendingSince = $3 ""where id = $1 and finished = 0") - edit in src/sql/hydra.sql at line 224
notificationPendingSince integer, - replacement in src/sql/hydra.sql at line 230
foreign key (project) references Projects(name) on update cascade,foreign key (project, jobset) references Jobsets(project, name) on update cascade,foreign key (project, jobset, job) references Jobs(project, jobset, name) on update cascadeforeign key (project) references Projects(name) on update cascade,foreign key (project, jobset) references Jobsets(project, name) on update cascade,foreign key (project, jobset, job) references Jobs(project, jobset, name) on update cascade - edit in src/sql/hydra.sql at line 682[3.105]
create index IndexBuildsOnNotificationPendingSince on Builds(notificationPendingSince) where notificationPendingSince is not null; - file addition: upgrade-55.sql[29.3004]
alter table Builds add column notificationPendingSince integer;create index IndexBuildsOnNotificationPendingSince on Builds(notificationPendingSince) where notificationPendingSince is not null;