Improve handling of Perl's block eval errors
[?]
May 26, 2020, 8:56 AM
CQZQE32VR5JFHR2AQZVPXCGBHLJCLIZ3IX6NA3SWO2R44XVBSAGACDependencies
- [2]
MIQH5W3FTest: Show error output from hydra-queue-runner on timeout - [3]
HEZQ273Simprove the error messages when invalid declarative jobsets are defined - [4]
4ZCUCACYhydra-notify: Fix processing notifications - [5]
L54KA7IMhandleDeclarativeJobsetBuild: handle errors from readNixFile - [6]
XCXMK24UKeep track of the number of unsupported steps - [7]
NYTT5WP3Keep track of the number of unsupported steps - [8]
3BTJRSU3GitInput.pm: Don't do a chdir to the Git clone - [9]
A2GL5FOZMoar stats - [10]
PMNWRTGJAdd multiple output support - [11]
LE4VZIY5More stats - [12]
VHV6GI4LAdd a jobset eval action to restart all aborted/cancelled builds - [13]
DWFTK56EKeep track of how many threads are waiting - [14]
IE2PRAQUhydra-queue-runner: Send build notifications - [15]
CHI2EHBJdeclarative projects: Pull jobset spec build from the remote store - [16]
GFORSLLEadd metrics for hydra notifications. - [17]
6WRGCITDEnable declarative projects. - [18]
NTEDD7T4Provide a plugin hook for when build steps finish - [19]
JAH3UPWASupport revision control systems via plugins - [20]
7Q2PXRZAhydra-notify step-finished: Don't barf if the step has no log file - [21]
32KJOERMTurn hydra-notify into a daemon - [22]
DODOGD7MSend queue runner stats to statsd - [23]
BZSJO2RMhydra-send-stats: Keep track of the number of machines - [*]
OOQ2D3KC* Refactoring: move fetchInput out of hydra_scheduler into a separate - [*]
2GK5DOU7* Downloading closures.
Change contents
- replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 77
};if ($@) {} or do {# If readNixFile errors or returns an undef or an empty string - replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 81
}}; - replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 91
};if ($@) {1;} or do { - edit in src/lib/Hydra/Helper/AddBuilds.pm at line 97
1;} or do {# note the error in the database in the case eval fails for whatever reason$project->jobsets->find({ name => ".jobsets" })->update({ errormsg => $@, errortime => time, fetcherrormsg => undef }) - edit in src/lib/Hydra/Helper/AddBuilds.pm at line 102
$project->jobsets->find({ name => ".jobsets" })->update({ errormsg => $@, errortime => time, fetcherrormsg => undef })if defined $@; - edit in src/lib/Hydra/Helper/Nix.pm at line 359
1;} or do {die unless $@ eq "timeout\n"; # propagate unexpected errorsreturn (-1, $stdout, ($stderr // "") . "timeout\n"); - replacement in src/lib/Hydra/Helper/Nix.pm at line 365[8.1951]→[8.1951:2033](∅→∅),[8.2033]→[2.0:61](∅→∅),[2.61]→[8.2071:2123](∅→∅),[8.2071]→[8.2071:2123](∅→∅),[8.2123]→[8.36:42](∅→∅)
if ($@) {die unless $@ eq "timeout\n"; # propagate unexpected errorsreturn (-1, $stdout, ($stderr // "") . "timeout\n");} else {return ($?, $stdout, $stderr);}return ($?, $stdout, $stderr); - replacement in src/lib/Hydra/Helper/Nix.pm at line 393
};$res->{status} = $?;chomp $res->{stdout} if $args{chomp} // 0; - replacement in src/lib/Hydra/Helper/Nix.pm at line 396
if ($@) {1;} or do { - replacement in src/lib/Hydra/Helper/Nix.pm at line 401
} else {$res->{status} = $?;chomp $res->{stdout} if $args{chomp} // 0;}}; - replacement in src/script/hydra-notify at line 32
eval { $plugin->buildStarted($build); };if ($@) {print STDERR "$plugin->buildStarted: $@\n";eval {$plugin->buildStarted($build);1;} or do {print STDERR "error with $plugin->buildStarted: $@\n"; - replacement in src/script/hydra-notify at line 58
eval { $plugin->buildFinished($build, [@dependents]); };if ($@) {print STDERR "$plugin->buildFinished: $@\n";eval {$plugin->buildFinished($build, [@dependents]);1;} or do {print STDERR "error with $plugin->buildFinished: $@\n"; - replacement in src/script/hydra-notify at line 81
eval { $plugin->stepFinished($step, $logPath); };if ($@) {print STDERR "$plugin->stepFinished: $@\n";eval {$plugin->stepFinished($step, $logPath);1;} or do {print STDERR "error with $plugin->stepFinished: $@\n"; - replacement in src/script/hydra-notify at line 124
};if ($@) {1;} or do { - edit in src/script/hydra-send-stats at line 38
gauge("hydra.queue.steps.unsupported", $json->{nrUnsupportedSteps}); - resolve order conflict in src/script/hydra-send-stats at line 38
- replacement in src/script/hydra-send-stats at line 63
eval { sendQueueRunnerStats(); };if ($@) { warn "$@"; }eval {sendQueueRunnerStats();1;} or do { warn "$@"; }