Make the output size limit configurable
[?]
Mar 9, 2016, 3:59 PM
BG6PEOB2M2Y56QPVMELU7VNNCGNMSQ2K6ATBUCPJLKPLTDWNJQ5ACDependencies
- [2]
TDSBTZKXAdd log message - [3]
SL3WSRAChydra-queue-runner: Limit memory usage - [4]
UNVMKJV5Unify build and step status codes - [5]
TPNHTE5VRemove obsolete Builds columns and provide accurate "Running builds" - [6]
N4IROACVMove buildRemote() into State - [7]
HH3LID6LRe-implement log size limits - [8]
IK2UBDAURevive jobset scheduling - [9]
NKQOEVVPGet rid of "will retry" messages after "maybe cancelling..." - [10]
73YR46NJhydra-queue-runner: Write directly to a binary cache - [11]
BRAESISHWarn if PostgreSQL appears stalled - [12]
NAYQT2GThydra-queue-runner: Use cmdBuildDerivation - [13]
MHVIT4JYSplit hydra-queue-runner.cc more - [14]
DKJFD6JNProcess Nix API changes - [15]
FITVNQ2SKeep track of the time we spend copying to/from build machines - [16]
BAFICF73Support hydra-build-products on binary cache stores - [17]
5AIYUMTBBasic remote building - [18]
HJOEIMLRRefactor - [19]
UYUVQWXQFix hydra-queue-runner --build-one - [20]
UVNTWTWGPrevent download of NARs we just uploaded - [*]
24BMQDZAStart of single-process hydra-queue-runner - [*]
V2UCCYN3hydra-queue-runner: Get store mode configuration from hydra.conf - [*]
EOO4EFWDUse a single BinaryCacheStore for all threads - [*]
J5UVLXOK* Start of a basic Catalyst web interface. - [*]
IK53RV4V - [*]
6KIJX24RGet rid of unnecessary [%- and -%] tags - [*]
T6KISLR6Fix indentation - [*]
N22GPKYT* Put info about logs / build products in the DB. - [*]
BD3GRK4B* Get rid of "positive failures" and separate log phases.
Change contents
- replacement in src/hydra-queue-runner/build-remote.cc at line 264
if (res == 100) result.status = BuildResult::PermanentFailure;else if (res == 101) result.status = BuildResult::TimedOut;else result.status = BuildResult::MiscFailure;if (res == 100) {result.stepStatus = bsFailed;result.canCache = true;}else if (res == 101) {result.stepStatus = bsTimedOut;}else {result.stepStatus = bsAborted;result.canRetry = true;} - replacement in src/hydra-queue-runner/build-remote.cc at line 277
result.status = BuildResult::Built;result.stepStatus = bsSuccess; - edit in src/hydra-queue-runner/build-remote.cc at line 279
result.status = (BuildResult::Status) res; - replacement in src/hydra-queue-runner/build-remote.cc at line 280
if (!result.success()) return;switch ((BuildResult::Status) res) {case BuildResult::Built:result.stepStatus = bsSuccess;break;case BuildResult::Substituted:case BuildResult::AlreadyValid:result.stepStatus = bsSuccess;result.isCached = true;break;case BuildResult::PermanentFailure:result.stepStatus = bsFailed;result.canCache = true;result.errorMsg = "";break;case BuildResult::InputRejected:case BuildResult::OutputRejected:result.stepStatus = bsFailed;result.canCache = true;break;case BuildResult::TransientFailure:result.stepStatus = bsFailed;result.canRetry = true;result.errorMsg = "";break;case BuildResult::CachedFailure: // cached on the build machineresult.stepStatus = bsCachedFailure;result.canCache = true;result.errorMsg = "";break;case BuildResult::TimedOut:result.stepStatus = bsTimedOut;result.errorMsg = "";break;case BuildResult::MiscFailure:result.stepStatus = bsAborted;result.canRetry = true;break;case BuildResult::LogLimitExceeded:result.stepStatus = bsLogLimitExceeded;break;default:result.stepStatus = bsAborted;break;}if (result.stepStatus != bsSuccess) return; - edit in src/hydra-queue-runner/build-remote.cc at line 326
result.errorMsg = ""; - replacement in src/hydra-queue-runner/build-remote.cc at line 331
if (result.status == BuildResult::Substituted || result.status == BuildResult::AlreadyValid) {if (result.isCached) { - edit in src/hydra-queue-runner/build-remote.cc at line 359
if (totalNarSize > maxOutputSize) {result.stepStatus = bsNarSizeLimitExceeded;return;} - replacement in src/hydra-queue-runner/builder.cc at line 108
bool cachedFailure = checkCachedFailure(step, *conn);if (cachedFailure)result.status = BuildResult::CachedFailure;if (checkCachedFailure(step, *conn))result.stepStatus = bsCachedFailure; - edit in src/hydra-queue-runner/builder.cc at line 125
} catch (NoTokens & e) {result.stepStatus = bsNarSizeLimitExceeded; - replacement in src/hydra-queue-runner/builder.cc at line 128
result.status = BuildResult::MiscFailure;result.stepStatus = bsAborted; - replacement in src/hydra-queue-runner/builder.cc at line 132
if (result.success())if (result.stepStatus == bsSuccess) - replacement in src/hydra-queue-runner/builder.cc at line 162
if (result.canRetry()) {if (result.canRetry) { - replacement in src/hydra-queue-runner/builder.cc at line 181
if (result.success()) {if (result.stepStatus == bsSuccess) { - replacement in src/hydra-queue-runner/builder.cc at line 228
markSucceededBuild(txn, b, res, build != b || result.status != BuildResult::Built,markSucceededBuild(txn, b, res, build != b || result.isCached, - edit in src/hydra-queue-runner/builder.cc at line 311[5.10398]→[5.10398:10515](∅→∅),[5.10515]→[5.482:572](∅→∅),[5.572]→[5.10515:10597](∅→∅),[5.10515]→[5.10515:10597](∅→∅)
BuildStatus buildStatus =result.status == BuildResult::TimedOut ? bsTimedOut :result.status == BuildResult::LogLimitExceeded ? bsLogLimitExceeded :result.canRetry() ? bsAborted :bsFailed; - replacement in src/hydra-queue-runner/builder.cc at line 314
if (result.status == BuildResult::PermanentFailure ||result.status == BuildResult::TransientFailure ||result.status == BuildResult::CachedFailure ||result.status == BuildResult::TimedOut ||result.status == BuildResult::LogLimitExceeded)if (result.stepStatus != bsAborted) - replacement in src/hydra-queue-runner/builder.cc at line 317
/* Create failed build steps for every build that dependson this. For cached failures, only create a step forbuilds that don't have this step as top-level(otherwise the user won't be able to see what causedthe build to fail). *//* Create failed build steps for every build thatdepends on this, except when this step is cachedand is the top-level of that build (since then it'sredundant with the build's isCachedBuild field). */ - replacement in src/hydra-queue-runner/builder.cc at line 322
if ((cachedFailure && build2->drvPath == step->drvPath) ||(!cachedFailure && build == build2) ||if ((result.stepStatus == bsCachedFailure && build2->drvPath == step->drvPath) ||(result.stepStatus != bsCachedFailure && build == build2) || - replacement in src/hydra-queue-runner/builder.cc at line 327
buildStatus, result.errorMsg, build == build2 ? 0 : build->id);result.stepStatus, result.errorMsg, build == build2 ? 0 : build->id); - replacement in src/hydra-queue-runner/builder.cc at line 330
if (!cachedFailure)if (result.stepStatus != bsCachedFailure) - replacement in src/hydra-queue-runner/builder.cc at line 332
build->id, stepNr, machine->sshName, buildStatus, result.errorMsg);build->id, stepNr, machine->sshName, result.stepStatus, result.errorMsg); - replacement in src/hydra-queue-runner/builder.cc at line 341
((int) (build2->drvPath != step->drvPath && buildStatus == bsFailed ? bsDepFailed : buildStatus))((int) (build2->drvPath != step->drvPath && result.buildStatus() == bsFailed ? bsDepFailed : result.buildStatus())) - replacement in src/hydra-queue-runner/builder.cc at line 344
(cachedFailure ? 1 : 0).exec();(result.stepStatus == bsCachedFailure ? 1 : 0).exec(); - replacement in src/hydra-queue-runner/builder.cc at line 350
if (!cachedFailure && result.status == BuildResult::PermanentFailure)if (result.stepStatus != bsCachedFailure && result.canCache) - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 44
{std::string s = hydraConfig["max-output-size"];if (s != "") string2Int(s, maxOutputSize);} - edit in src/hydra-queue-runner/state.hh at line 36
bsNarSizeLimitExceeded = 11, - replacement in src/hydra-queue-runner/state.hh at line 41
struct RemoteResult : nix::BuildResultstruct RemoteResult - edit in src/hydra-queue-runner/state.hh at line 43
BuildStatus stepStatus = bsAborted;bool canRetry = false; // for bsAbortedbool isCached = false; // for bsSucceedbool canCache = false; // for bsFailedstd::string errorMsg; // for bsAborted - replacement in src/hydra-queue-runner/state.hh at line 54
bool canRetry()BuildStatus buildStatus() - replacement in src/hydra-queue-runner/state.hh at line 56
return status == TransientFailure || status == MiscFailure;return stepStatus == bsCachedFailure ? bsFailed : stepStatus; - edit in src/hydra-queue-runner/state.hh at line 360
size_t maxOutputSize = 2ULL << 30; - edit in src/root/build.tt at line 68
[% ELSIF step.status == 11 %]<span class="error">Output limit exceeded</span> - edit in src/root/common.tt at line 210
[% ELSIF buildstatus == 11 %]<img src="[% c.uri_for("/static/images/warning_${size}.png") %]" alt="Output size limit exceeded" class="build-status" /> - edit in src/root/common.tt at line 241
[% ELSIF buildstatus == 11 %]<span class="error">Output limit exceeded</span> - edit in src/sql/hydra.sql at line 195[5.1238][30.4847]
-- 11 = NAR size limit exceeded