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]
MHVIT4JYSplit hydra-queue-runner.cc more - [8]
OBOTGFG6Prevent orphaned build steps - [9]
BG6PEOB2Make the output size limit configurable - [10]
LVQXQIYAKill active build steps when builds are cancelled - [11]
5AIYUMTBBasic remote building - [12]
PHX2HIVG* Store info about the build inputs in the build record. - [13]
3ZCEPLNO - [14]
TPNHTE5VRemove obsolete Builds columns and provide accurate "Running builds" - [15]
UNVMKJV5Unify build and step status codes - [16]
24BMQDZAStart of single-process hydra-queue-runner - [17]
FQQRJUO4Mark builds as busy - [18]
HPEG2RHVMerge the BuildResultInfo table into the Builds table - [19]
VZCNKQSBRemove superfluous check - [20]
FITVNQ2SKeep track of the time we spend copying to/from build machines - [21]
62MQPRXCPass null values to libpqxx properly - [22]
SMUWBAD5Send BuildFinished notifications on cached build results. - [23]
37R34XJO* Negative caching: don't perform a build if a dependency already - [24]
5DSF5KWY* Perl sucks. "getBuildLog $drvPath" doesn't mean the same as - [25]
HPJKBFZ4Handle concurrent finishing of the same build - [*]
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;