Distinguish build step states
[?]
Dec 7, 2017, 2:35 PM
G7KWXSFMFPFSCJ7ZD4Z6RNZSDHMHTOUDO3G6R6GYO6VDUDPMIKDQCDependencies
- [2]
YNO7CQ6Phydra-queue-runner: More accurate memory accounting - [3]
EPWEMRI2Allow determinism checking for entire jobsets - [4]
EYAA7MJYhydra-server: Support logs in S3 - [5]
LSUX6IQRUpdate to latest nixUnstable - [6]
6K5PBUUNUse buildEnv to combine Hydra's Perl dependencies - [7]
BG6PEOB2Make the output size limit configurable - [8]
LENA4O2VPeriodically close RemoteStore connections - [9]
R2PON6R7Allow non-admin users to see the machine status page - [10]
PMNWRTGJAdd multiple output support - [11]
MHVIT4JYSplit hydra-queue-runner.cc more - [12]
6QRHXIM3* Speed up the jobset index page. Especially the query to get the - [13]
OTNJLJHASort build steps - [14]
62MQPRXCPass null values to libpqxx properly - [15]
7LWB2J2ZPeriodically clear orphaned build steps - [16]
DKJFD6JNProcess Nix API changes - [17]
UNVLTCV4Fix showing machine name for aborted build steps - [18]
TX7Q4RASAdd page showing latest build steps - [19]
UNVMKJV5Unify build and step status codes - [20]
2DNPZFPNStep cancellation: Don't use pthread_cancel() - [21]
YZAI5GQUImplement a database connection pool - [22]
73YR46NJhydra-queue-runner: Write directly to a binary cache - [23]
24BMQDZAStart of single-process hydra-queue-runner - [24]
2GUAKGTBFix indentation of build.tt - [25]
5JB5DKQLDon't repeat links to build step logs - [26]
PLOZBRTRAdd command ‘hydra-queue-runner --status’ to show current status - [27]
IE2PRAQUhydra-queue-runner: Send build notifications - [28]
LZVO64YGMerge in the first bits of the API work - [29]
KDBWLKRPIndex BuildSteps on propagatedFrom - [30]
K42RSSSI - [31]
T5BIOVJEAdd support for tracking custom metrics - [32]
HTL6HIBMmachine-status: Read /etc/nix.machines instead of using the BuildMachines table - [33]
CQTN62OHDie tabs die - [34]
NQ2X3Y4KDon't render machine name if not applicable to step - [35]
E46TNJK6Use faster query to determine number of running builds - [36]
B7ENVLRShydra-queue-runner: Make build notification more reliable - [37]
LVQXQIYAKill active build steps when builds are cancelled - [38]
N4IROACVMove buildRemote() into State - [39]
UVNTWTWGPrevent download of NARs we just uploaded - [40]
V6S6OYIAFormatting tweaks - [41]
TFVGX4JSAdd an index to speed up the /project/<name> pages - [42]
RAKTHYAI* In the job status and error pages, show when the status of a job - [43]
BAFICF73Support hydra-build-products on binary cache stores - [44]
EHEQ4AY3Fix retry of transient failures - [45]
OG7BEM57 - [46]
5AIYUMTBBasic remote building - [47]
UUGBVEGY* Development notes. - [48]
YF3HTIPFUse partial indexes - [49]
PH3DFCNURender machine correctly if it doesn't contain @ - [50]
TPNHTE5VRemove obsolete Builds columns and provide accurate "Running builds" - [51]
7LFMSF4KDon't show "localhost" as machine for cached failed build steps - [52]
O5ZANJMRMake "Running builds" and "Machine status" pages faster - [*]
BYVRA54QTemporarily disable machines on any exception, not just connection failures - [*]
NAYQT2GThydra-queue-runner: Use cmdBuildDerivation - [*]
HJOEIMLRRefactor - [*]
J5UVLXOK* Start of a basic Catalyst web interface. - [*]
ZWCTAZGLadded newsitems, added some admin options to clear various caches. - [*]
N22GPKYT* Put info about logs / build products in the DB. - [*]
CLJQCY2X* Store info about all the build actions and allow them to be - [*]
D5QIOJGP* Move everything up one directory.
Change contents
- replacement in doc/dev-notes.txt at line 98
delete from builds where finished = 0 and not exists (select 1 from buildschedulinginfo s where s.id = builds.id and busy = 1);delete from builds where finished = 0 and not exists (select 1 from buildschedulinginfo s where s.id = builds.id and busy != 0); - replacement in src/hydra-queue-runner/build-remote.cc at line 125
RemoteResult & result, std::shared_ptr<ActiveStep> activeStep)RemoteResult & result, std::shared_ptr<ActiveStep> activeStep,std::function<void(StepState)> updateStep) - edit in src/hydra-queue-runner/build-remote.cc at line 143
updateStep(ssConnecting); - edit in src/hydra-queue-runner/build-remote.cc at line 210
updateStep(ssSendingInputs); - edit in src/hydra-queue-runner/build-remote.cc at line 268
updateStep(ssBuilding); - edit in src/hydra-queue-runner/build-remote.cc at line 381
updateStep(ssReceivingOutputs); - edit in src/hydra-queue-runner/builder.cc at line 197
auto updateStep = [&](StepState stepState) {pqxx::work txn(*conn);updateBuildStep(txn, buildId, stepNr, stepState);txn.commit();}; - replacement in src/hydra-queue-runner/builder.cc at line 207
buildRemote(destStore, machine, step, maxSilentTime, buildTimeout, repeats, result, activeStep);buildRemote(destStore, machine, step, maxSilentTime, buildTimeout, repeats, result, activeStep, updateStep); - replacement in src/hydra-queue-runner/builder.cc at line 222
if (result.stepStatus == bsSuccess)if (result.stepStatus == bsSuccess) {updateStep(ssPostProcessing); - edit in src/hydra-queue-runner/builder.cc at line 225
} - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 274
("update BuildSteps set busy = 0, status = $1, stopTime = $2 where busy = 1")("update BuildSteps set busy = 0, status = $1, stopTime = $2 where busy != 0") - edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 317
}void State::updateBuildStep(pqxx::work & txn, BuildID buildId, unsigned int stepNr, StepState stepState){if (txn.parameterized("update BuildSteps set busy = $1 where build = $2 and stepnr = $3 and busy != 0 and status is null")((int) stepState)(buildId)(stepNr).exec().affected_rows() != 1)throw Error("step %d of build %d is in an unexpected state", stepNr, buildId); - replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 907
("update BuildSteps set busy = 0, status = $1 where build = $2 and stepnr = $3 and busy = 1")("update BuildSteps set busy = 0, status = $1 where build = $2 and stepnr = $3 and busy != 0") - edit in src/hydra-queue-runner/state.hh at line 44
typedef enum {ssPreparing = 1,ssConnecting = 10,ssSendingInputs = 20,ssBuilding = 30,ssReceivingOutputs = 40,ssPostProcessing = 50,} StepState; - edit in src/hydra-queue-runner/state.hh at line 476
void updateBuildStep(pqxx::work & txn, BuildID buildId, unsigned int stepNr, StepState stepState); - replacement in src/hydra-queue-runner/state.hh at line 533
RemoteResult & result, std::shared_ptr<ActiveStep> activeStep);RemoteResult & result, std::shared_ptr<ActiveStep> activeStep,std::function<void(StepState)> updateStep); - replacement in src/lib/Hydra/Controller/Root.pm at line 56
"select count(distinct build) from buildsteps where busy = 1");"select count(distinct build) from buildsteps where busy != 0"); - replacement in src/lib/Hydra/Controller/Root.pm at line 148
{ "buildsteps.busy" => 1 },{ "buildsteps.busy" => { '!=', 0 } }, - replacement in src/lib/Hydra/Controller/Root.pm at line 196
"where busy = 1 order by machine, stepnr","where busy != 0 order by machine, stepnr", - replacement in src/root/build.tt at line 32
[% IF ( type == "All" ) || ( type == "Failed" && step.busy == 0 && step.status != 0 ) || ( type == "Running" && step.busy == 1 ) %][% IF ( type == "All" ) || ( type == "Failed" && step.busy == 0 && step.status != 0 ) || ( type == "Running" && step.busy != 0 ) %] - replacement in src/root/build.tt at line 58
<td>[% IF step.busy == 1 || ((step.machine || step.starttime) && (step.status == 0 || step.status == 1 || step.status == 3 || step.status == 4 || step.status == 7)); INCLUDE renderMachineName machine=step.machine; ELSE; "<em>n/a</em>"; END %]</td><td>[% IF step.busy != 0 || ((step.machine || step.starttime) && (step.status == 0 || step.status == 1 || step.status == 3 || step.status == 4 || step.status == 7)); INCLUDE renderMachineName machine=step.machine; ELSE; "<em>n/a</em>"; END %]</td> - replacement in src/root/build.tt at line 60
[% IF step.busy == 1 %]<strong>Building</strong>[% IF step.busy != 0 %][% IF step.busy == 1 %]<strong>Preparing</strong>[% ELSIF step.busy == 10 %]<strong>Connecting</strong>[% ELSIF step.busy == 20 %]<strong>Sending inputs</strong>[% ELSIF step.busy == 30 %]<strong>Building</strong>[% ELSIF step.busy == 40 %]<strong>Receiving outputs</strong>[% ELSIF step.busy == 50 %]<strong>Post-processing</strong>[% ELSE %]<strong>Unknown state</strong>[% END %] - replacement in src/root/machine-status.tt at line 45
<td><a class="row-link" href="[% c.uri_for('/build' step.build 'nixlog' step.stepnr 'tail') %]">[% step.stepnr %]</a></td><td>[% IF step.busy >= 30 %]<a class="row-link" href="[% c.uri_for('/build' step.build 'nixlog' step.stepnr 'tail') %]">[% step.stepnr %]</a>[% ELSE; step.stepnr; END %]</td> - edit in src/sql/hydra.sql at line 275
-- 0 = not busy-- 1 = building-- 2 = preparing to build-- 3 = connecting-- 4 = sending inputs-- 5 = receiving outputs-- 6 = analysing build result - replacement in src/sql/hydra.sql at line 658
create index IndexBuildStepsOnBusy on BuildSteps(busy) where busy = 1;create index IndexBuildStepsOnBusy on BuildSteps(busy) where busy != 0; - file addition: upgrade-56.sql[61.3004]
drop index IndexBuildStepsOnBusy;create index IndexBuildStepsOnBusy on BuildSteps(busy) where busy != 0;