Make the output size limit configurable
The maximum output size per build step (as the sum of the NARs of each output) can be set via hydra.conf, e.g. max-output-size = 1000000000 The default is 2 GiB. Also refactored the build error / status handling a bit.
This commit is contained in:
@ -33,20 +33,27 @@ typedef enum {
|
||||
bsCachedFailure = 8, // steps only
|
||||
bsUnsupported = 9,
|
||||
bsLogLimitExceeded = 10,
|
||||
bsNarSizeLimitExceeded = 11,
|
||||
bsBusy = 100, // not stored
|
||||
} BuildStatus;
|
||||
|
||||
|
||||
struct RemoteResult : nix::BuildResult
|
||||
struct RemoteResult
|
||||
{
|
||||
BuildStatus stepStatus = bsAborted;
|
||||
bool canRetry = false; // for bsAborted
|
||||
bool isCached = false; // for bsSucceed
|
||||
bool canCache = false; // for bsFailed
|
||||
std::string errorMsg; // for bsAborted
|
||||
|
||||
time_t startTime = 0, stopTime = 0;
|
||||
unsigned int overhead = 0;
|
||||
nix::Path logFile;
|
||||
std::shared_ptr<nix::FSAccessor> accessor;
|
||||
|
||||
bool canRetry()
|
||||
BuildStatus buildStatus()
|
||||
{
|
||||
return status == TransientFailure || status == MiscFailure;
|
||||
return stepStatus == bsCachedFailure ? bsFailed : stepStatus;
|
||||
}
|
||||
};
|
||||
|
||||
@ -350,6 +357,8 @@ private:
|
||||
tokens are available. */
|
||||
nix::TokenServer memoryTokens;
|
||||
|
||||
size_t maxOutputSize = 2ULL << 30;
|
||||
|
||||
public:
|
||||
State();
|
||||
|
||||
|
Reference in New Issue
Block a user