Allow determinism checking for entire jobsets
[?]
Dec 7, 2016, 2:57 PM
EPWEMRI23UN6C777AL2GWEOXYZRTPEPFC2SZVZ4JTWUGYVFDL5XACDependencies
- [2]
J5KJ6IICAdd tooltips to metrics showing the exact value of the data point - [3]
2DNPZFPNStep cancellation: Don't use pthread_cancel() - [4]
EFWDY2V7Support testing build determinism - [5]
MHVIT4JYSplit hydra-queue-runner.cc more - [6]
2GUAKGTBFix indentation of build.tt - [7]
TX7Q4RASAdd page showing latest build steps - [8]
62MQPRXCPass null values to libpqxx properly - [9]
OCZ4LSGGAutomatically retry aborted builds - [10]
73YR46NJhydra-queue-runner: Write directly to a binary cache - [11]
PH3DFCNURender machine correctly if it doesn't contain @ - [12]
HH3LID6LRe-implement log size limits - [13]
BRAESISHWarn if PostgreSQL appears stalled - [14]
UQQ4IL55Add a error type for "unsupported system type" - [15]
OBOTGFG6Prevent orphaned build steps - [16]
DKJFD6JNProcess Nix API changes - [17]
JGLE5BRNAdd separate build step status codes for cached failures and timeouts - [18]
BYVRA54QTemporarily disable machines on any exception, not just connection failures - [19]
5AIYUMTBBasic remote building - [20]
FITVNQ2SKeep track of the time we spend copying to/from build machines - [21]
FCTX433OAdd buildStarted plugin hook - [22]
OG3Z3QGCNamespace cleanup - [23]
NAYQT2GThydra-queue-runner: Use cmdBuildDerivation - [24]
PMNWRTGJAdd multiple output support - [25]
7LFMSF4KDon't show "localhost" as machine for cached failed build steps - [26]
24BMQDZAStart of single-process hydra-queue-runner - [27]
VQISTKOPhydra-queue-runner: Use substitutes - [28]
BG6PEOB2Make the output size limit configurable - [29]
UNVLTCV4Fix showing machine name for aborted build steps - [30]
N4IROACVMove buildRemote() into State - [31]
LVQXQIYAKill active build steps when builds are cancelled - [32]
NQ2X3Y4KDon't render machine name if not applicable to step - [33]
UJOSXBZIRecord which build a failed build step was propagated from - [34]
HJOEIMLRRefactor - [35]
K22TMPH5Make the info tables less compressed - [36]
OPN3PED2Tweak - [37]
UNVMKJV5Unify build and step status codes - [38]
7LWB2J2ZPeriodically clear orphaned build steps - [39]
KBZHIGLGRecord the machine used for a build step - [40]
NTEDD7T4Provide a plugin hook for when build steps finish - [*]
V2UCCYN3hydra-queue-runner: Get store mode configuration from hydra.conf - [*]
PLOZBRTRAdd command ‘hydra-queue-runner --status’ to show current status - [*]
CLJQCY2X* Store info about all the build actions and allow them to be - [*]
EFWN7JBV* Added a status page that shows all the currently executing build steps. - [*]
J5UVLXOK* Start of a basic Catalyst web interface. - [*]
U2X3Y53Gmake sure status images always display for a list of builds - [*]
N22GPKYT* Put info about logs / build products in the DB. - [*]
3E6IP3R3* Add the name of the jobset to ReleaseSetJobs, otherwise we can't - [*]
D5QIOJGP* Move everything up one directory.
Change contents
- replacement in src/hydra-queue-runner/build-remote.cc at line 119
unsigned int maxSilentTime, unsigned int buildTimeout,unsigned int maxSilentTime, unsigned int buildTimeout, unsigned int repeats, - replacement in src/hydra-queue-runner/build-remote.cc at line 266
if (GET_PROTOCOL_MINOR(remoteVersion) >= 3)// FIXME: make the number of repeats configurable.to << (step->isDeterministic ? 1 : 0);if (GET_PROTOCOL_MINOR(remoteVersion) >= 3) {to << repeats // == build-repeat<< step->isDeterministic; // == enforce-determinism} - edit in src/hydra-queue-runner/build-remote.cc at line 299
if (GET_PROTOCOL_MINOR(remoteVersion) >= 3) {result.timesBuilt = readInt(from);result.isNonDeterministic = readInt(from);} - edit in src/hydra-queue-runner/builder.cc at line 89
unsigned int repeats = step->isDeterministic ? 1 : 0; - edit in src/hydra-queue-runner/builder.cc at line 116
}{auto i = jobsetRepeats.find(std::make_pair(build2->projectName, build2->jobsetName));if (i != jobsetRepeats.end())repeats = std::max(repeats, i->second); - replacement in src/hydra-queue-runner/builder.cc at line 130
printMsg(lvlInfo, format("performing step ‘%1%’ on ‘%2%’ (needed by build %3% and %4% others)")% step->drvPath % machine->sshName % buildId % (dependents.size() - 1));printInfo("performing step ‘%s’ %d times on ‘%s’ (needed by build %d and %d others)",step->drvPath, repeats + 1, machine->sshName, buildId, (dependents.size() - 1)); - replacement in src/hydra-queue-runner/builder.cc at line 171
buildRemote(destStore, machine, step, maxSilentTime, buildTimeout, result, activeStep);buildRemote(destStore, machine, step, maxSilentTime, buildTimeout, repeats, result, activeStep); - replacement in src/hydra-queue-runner/builder.cc at line 233
finishBuildStep(txn, result.startTime, result.stopTime, result.overhead, buildId,stepNr, machine->sshName, result.stepStatus, result.errorMsg);finishBuildStep(txn, result, buildId, stepNr, machine->sshName); - replacement in src/hydra-queue-runner/builder.cc at line 287
finishBuildStep(txn, result.startTime, result.stopTime, result.overhead,buildId, stepNr, machine->sshName, bsSuccess);finishBuildStep(txn, result, buildId, stepNr, machine->sshName); - replacement in src/hydra-queue-runner/builder.cc at line 393[5.477]→[5.691:784](∅→∅),[5.3420]→[5.691:784](∅→∅),[5.12039]→[5.691:784](∅→∅),[5.784]→[5.2409:2505](∅→∅)
finishBuildStep(txn, result.startTime, result.stopTime, result.overhead,buildId, stepNr, machine->sshName, result.stepStatus, result.errorMsg);finishBuildStep(txn, result, buildId, stepNr, machine->sshName); - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 267[5.9262]→[5.881:985](∅→∅),[5.985]→[5.703:794](∅→∅),[5.777]→[5.1071:1129](∅→∅),[5.794]→[5.1071:1129](∅→∅),[5.1071]→[5.1071:1129](∅→∅)
void State::finishBuildStep(pqxx::work & txn, time_t startTime, time_t stopTime, unsigned int overhead,BuildID buildId, unsigned int stepNr, const std::string & machine, BuildStatus status,const std::string & errorMsg, BuildID propagatedFrom)void State::finishBuildStep(pqxx::work & txn, const RemoteResult & result,BuildID buildId, unsigned int stepNr, const std::string & machine) - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 270
assert(startTime);assert(stopTime);assert(result.startTime);assert(result.stopTime); - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 273[5.413]→[5.1130:1315](∅→∅),[5.942]→[5.414:535](∅→∅),[5.1315]→[5.414:535](∅→∅),[5.9757]→[5.414:535](∅→∅),[5.9611]→[5.414:535](∅→∅),[5.535]→[5.943:973](∅→∅)
("update BuildSteps set busy = 0, status = $1, propagatedFrom = $4, errorMsg = $5, startTime = $6, stopTime = $7, machine = $8, overhead = $9 where build = $2 and stepnr = $3")((int) status)(buildId)(stepNr)(propagatedFrom, propagatedFrom != 0)(errorMsg, errorMsg != "")(startTime)(stopTime)("update BuildSteps set busy = 0, status = $1, errorMsg = $4, startTime = $5, stopTime = $6, machine = $7, overhead = $8, timesBuilt = $9, isNonDeterministic = $10 where build = $2 and stepnr = $3")((int) result.stepStatus)(buildId)(stepNr)(result.errorMsg, result.errorMsg != "")(result.startTime)(result.stopTime) - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 278
(overhead, overhead != 0).exec();(result.overhead, result.overhead != 0)(result.timesBuilt, result.timesBuilt > 0)(result.isNonDeterministic, result.timesBuilt > 1).exec(); - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 813
// FIXME: hacky mechanism for configuring determinism checks.for (auto & s : tokenizeString<Strings>(hydraConfig["xxx-jobset-repeats"])) {auto s2 = tokenizeString<std::vector<std::string>>(s, ":");if (s2.size() != 3) throw Error("bad value in xxx-jobset-repeats");jobsetRepeats.emplace(std::make_pair(s2[0], s2[1]), std::stoi(s2[2]));} - edit in src/hydra-queue-runner/state.hh at line 50
unsigned int timesBuilt = 0;bool isNonDeterministic = false; - edit in src/hydra-queue-runner/state.hh at line 419
/* How often the build steps of a jobset should be repeated inorder to detect non-determinism. */std::map<std::pair<std::string, std::string>, unsigned int> jobsetRepeats; - replacement in src/hydra-queue-runner/state.hh at line 447[5.7255]→[5.1424:1502](∅→∅),[5.1502]→[5.3425:3494](∅→∅),[5.3494]→[5.1122:1214](∅→∅),[5.1562]→[5.1122:1214](∅→∅),[5.763]→[5.7453:7490](∅→∅),[5.1214]→[5.7453:7490](∅→∅),[5.7453]→[5.7453:7490](∅→∅)
void finishBuildStep(pqxx::work & txn, time_t startTime, time_t stopTime,unsigned int overhead, BuildID buildId, unsigned int stepNr,const std::string & machine, BuildStatus status, const std::string & errorMsg = "",BuildID propagatedFrom = 0);void finishBuildStep(pqxx::work & txn, const RemoteResult & result, BuildID buildId, unsigned int stepNr,const std::string & machine); - edit in src/hydra-queue-runner/state.hh at line 500
unsigned int repeats, - edit in src/lib/Hydra/Schema/BuildSteps.pm at line 104
is_nullable: 1=head2 timesbuiltdata_type: 'integer'is_nullable: 1=head2 isnondeterministicdata_type: 'boolean' - edit in src/lib/Hydra/Schema/BuildSteps.pm at line 145
"timesbuilt",{ data_type => "integer", is_nullable => 1 },"isnondeterministic",{ data_type => "boolean", is_nullable => 1 }, - replacement in src/lib/Hydra/Schema/BuildSteps.pm at line 218
# Created by DBIx::Class::Schema::Loader v0.07043 @ 2016-02-16 18:04:52# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TRALbEoaF/OIOyERYCyxkw# Created by DBIx::Class::Schema::Loader v0.07045 @ 2016-12-07 13:48:19# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3FYkqSUfgWmiqZzmX8J4TA - replacement in src/root/build.tt at line 53[5.69]→[5.985:1002](∅→∅),[5.200]→[5.985:1002](∅→∅),[5.240]→[5.985:1002](∅→∅),[5.240]→[5.985:1002](∅→∅),[5.958]→[5.985:1002](∅→∅),[5.5497]→[5.985:1002](∅→∅),[5.985]→[5.985:1002](∅→∅)
<td><td class="step-status"> - replacement in src/root/build.tt at line 57
Succeeded[% IF step.isnondeterministic %]<span class="warn">Succeeded with non-determistic result</span>[% ELSE %]Succeeded[% END %][% IF step.timesbuilt > 1 %]([% step.timesbuilt %] times)[% END %] - replacement in src/root/build.tt at line 66
<span class="error"><strong>Aborted</strong>[% IF step.errormsg %]: [% HTML.escape(step.errormsg); END %]</span><span class="error">Aborted</span>[% IF step.errormsg %]: <em>[% HTML.escape(step.errormsg) %]</em>[% END %] - replacement in src/root/build.tt at line 80
<span class="error">Non-deterministic build</span><span class="error">Non-determinism detected</span> [% IF step.timesbuilt %] after [% step.timesbuilt %] times[% END %] - replacement in src/root/build.tt at line 82
<span class="error">Failed: [% HTML.escape(step.errormsg) %]</span><span class="error">Failed</span>: <em>[% HTML.escape(step.errormsg) %]</em> - replacement in src/root/build.tt at line 147
[% INCLUDE renderBuildStatusIcon size=128, build=build %][% INCLUDE renderBuildStatusIcon size=128 build=build %] - edit in src/root/static/css/hydra.css at line 134
}td.step-status span.error {color: red;font-weight: bold; - edit in src/root/static/css/hydra.css at line 140[47.1100]
td.step-status span.warn {color: #aaaa00;font-weight: bold;} - edit in src/sql/hydra.sql at line 291
-- How many times this build step was done (for checking determinism).timesBuilt integer, - edit in src/sql/hydra.sql at line 295
-- Whether this build step produced different results when repeated.isNonDeterministic boolean, - file addition: upgrade-52.sql[50.3004]
alter table BuildStepsadd column timesBuilt integer,add column isNonDeterministic boolean;