Fail builds with previously failed steps early
[?]
Jun 15, 2015, 1:31 PM
IWB3F4Z6QZYHQFJ6FWZTGWLCPBYEUTFLUS3F7QT7JOA4DV4YLYGACDependencies
- [2]
UQQ4IL55Add a error type for "unsupported system type" - [3]
22LDPAIPCheck non-runnable steps for unsupported system type - [4]
RYTQLATYKeep track of failed paths in the Hydra database - [5]
5AIYUMTBBasic remote building - [6]
FQQRJUO4Mark builds as busy - [7]
YZAI5GQUImplement a database connection pool - [8]
KBZHIGLGRecord the machine used for a build step - [9]
24BMQDZAStart of single-process hydra-queue-runner - [10]
N5O7VEEOImmediately abort builds that require an unsupported system type - [*]
NJJ7H64SVery basic multi-threaded queue runner
Change contents
- edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 250[4.7481][12.1377]
bool checkCachedFailure(Step::ptr step, Connection & conn); - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 497
/* If any step has an unsupported system type, then fail thebuild. */bool allSupported = true;/* If any step has an unsupported system type or has apreviously failed output path, then fail the build rightaway. */bool badStep = false; - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 502
BuildStatus buildStatus = bsSuccess;BuildStepStatus buildStepStatus; - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 511
- edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 513
allSupported = false; - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 514
pqxx::work txn(conn);buildStatus = bsUnsupported;buildStepStatus = bssUnsupported;}if (checkCachedFailure(r, conn)) {printMsg(lvlError, format("failing build %1% due to previous failure") % build->id);buildStatus = step == r ? bsFailed : bsFailed;buildStepStatus = bssFailed;}if (buildStatus != bsSuccess) { - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 526
pqxx::work txn(conn); - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 528
("update Builds set finished = 1, busy = 0, buildStatus = $2, startTime = $3, stopTime = $3 where id = $1")("update Builds set finished = 1, busy = 0, buildStatus = $2, startTime = $3, stopTime = $3, isCachedBuild = $4 where id = $1") - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 530
((int) bsUnsupported)(now).exec();createBuildStep(txn, now, build, r, "", bssUnsupported);((int) buildStatus)(now)(buildStatus != bsUnsupported ? 1 : 0).exec();createBuildStep(txn, now, build, r, "", buildStepStatus); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 535
badStep = true; - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 540
if (!allSupported) continue;if (badStep) continue; - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 903[4.224]→[4.224:256](∅→∅),[4.256]→[4.15566:15572](∅→∅),[4.15566]→[4.15566:15572](∅→∅),[4.15572]→[4.708:739](∅→∅),[4.739]→[4.257:487](∅→∅),[4.487]→[4.15696:15702](∅→∅),[4.15696]→[4.15696:15702](∅→∅)
bool cachedFailure = false;{pqxx::work txn(*conn);for (auto & path : outputPaths(step->drv))if (!txn.parameterized("select 1 from FailedPaths where path = $1")(path).exec().empty()) {cachedFailure = true;break;}}bool cachedFailure = checkCachedFailure(step, *conn); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 1062[4.19072][12.3176]
}bool State::checkCachedFailure(Step::ptr step, Connection & conn){pqxx::work txn(conn);for (auto & path : outputPaths(step->drv))if (!txn.parameterized("select 1 from FailedPaths where path = $1")(path).exec().empty())return true;return false;