hydra-eval-jobs: write evaluation errorMsg to the jobseteval table

[?]
Jan 21, 2021, 4:14 PM
MLYGGEK7SIXPW4V546CKI3M7FLAC2HK6BHZDPRRDNQWMSHOU6GKAC

Dependencies

  • [2] 2FK2SDL5 Send notifications when evaluations start/finish/fail
  • [3] CUFVKLLA Remove Hydra::Helper::nix::txn_do from the Perl code
  • [4] AKRVETP5 Handle UTF-8 characters in eval error messages
  • [5] LZO3C2KI * Hack around those SQLite timeouts: just retry the transaction.
  • [6] SHZLOM5M * eval-jobs -> hydra_eval_jobs.
  • [7] NLJJZVHO * Use ->update({...}) properly.
  • [8] WQXF2T3D hydra-evaluator: Don't require $HYDRA_CONFIG
  • [9] H7CNGK4O * Log evaluation errors etc. in the DB.
  • [10] 7YBYT2LQ
  • [11] NS7SND6R hydra-evaluator: Send statistics to statsd
  • [12] SRBU2RAE Warn against multiple jobs with the same name
  • [13] RXVJFQ5A Evaluator cleanups
  • [14] S6OISBQ3 * Mark the "current" builds in a jobset, i.e. those corresponding to
  • [15] WVD3YYON hydra-evaluator: Add some debug code
  • [16] 7OBWA6AZ hydra-evaluator: Fix error handling in fetching inputs
  • [17] JQQYF4S3 Fix build-queued plugin hook
  • [18] X27GNHDV * Basic job info in the database.
  • [19] FYO6NECE hydra
  • [20] SS4TZXNU Distinguish between permanent evaluation errors and transient input errors
  • [21] MPFSVI5X Pedantry: CLOCK_REALTIME -> CLOCK_MONOTONIC
  • [22] NI5BVF2V * In job inputs of type "build", allow the project and jobset names of
  • [23] SGRUPSLK Only send email notification of evaluation error when the evaluation error has changed. Fixes #121.
  • [24] IMQRX4MP hydra-eval-jobs: Use JSON instead of XML
  • [25] CGHMXHOL Remove dead code
  • [26] GA6XIXAN * Show the input bindings in evaluation error messages.
  • [27] Y7GL2OF6 Disable the build-queued hook
  • [28] 7ZYBTNJJ revert unmeant previous change which caused errors to stay, even after successful evaluation of jobs
  • [*] N22GPKYT * Put info about logs / build products in the DB.
  • [*] S5PV6IIM * Represent jobs explicitly in the DB.

Change contents

  • replacement in src/script/hydra-eval-jobset at line 496
    [4.2985][4.2985:3019]()
    my ($jobset, $errorMsg) = @_;
    [4.2985]
    [4.0]
    my ($jobset, $errorMsg, $errorTime) = @_;
  • replacement in src/script/hydra-eval-jobset at line 501
    [3.1137][4.770:869](),[4.1442][4.770:869]()
    $jobset->update({ errormsg => $errorMsg, errortime => time, fetcherrormsg => undef });
    [3.1137]
    [4.3165]
    $jobset->update({ errormsg => $errorMsg, errortime => $errorTime, fetcherrormsg => undef });
  • edit in src/script/hydra-eval-jobset at line 683
    [31.5888]
    [4.0]
    # Store the error messages for jobs that failed to evaluate.
    my $evaluationErrorTime = time;
    my $evaluationErrorMsg = "";
    foreach my $job (values %{$jobs}) {
    next unless defined $job->{error};
    $evaluationErrorMsg .=
    ($job->{jobName} ne "" ? "in job ‘$job->{jobName}’" : "at top-level") .
    ":\n" . $job->{error} . "\n\n";
    }
    setJobsetError($jobset, $evaluationErrorMsg, $evaluationErrorTime);
  • edit in src/script/hydra-eval-jobset at line 721
    [4.853]
    [4.853]
    , errormsg => $evaluationErrorMsg
    , errortime => $evaluationErrorTime
  • edit in src/script/hydra-eval-jobset at line 808
    [4.1184][4.19:20](),[4.1185][4.2775:2840](),[4.1448][4.2775:2840](),[4.5866][4.2775:2840](),[4.2840][4.2831:2932](),[4.2932][4.152:168](),[4.517][4.152:168](),[4.168][4.2933:3065](),[4.318][4.4988:4994](),[4.1272][4.4988:4994](),[4.3065][4.4988:4994](),[4.4988][4.4988:4994](),[4.4994][4.99:134]()
    # Store the error messages for jobs that failed to evaluate.
    my $msg = "";
    foreach my $job (values %{$jobs}) {
    next unless defined $job->{error};
    $msg .=
    ($job->{jobName} ne "" ? "in job ‘$job->{jobName}’" : "at top-level") .
    ":\n" . $job->{error} . "\n\n";
    }
    setJobsetError($jobset, $msg);
  • edit in src/script/hydra-eval-jobset at line 834
    [4.269]
    [3.1215]
    my $eventTime = time;
  • replacement in src/script/hydra-eval-jobset at line 836
    [3.1241][4.2381:2437](),[4.1650][4.2381:2437](),[4.2381][4.2381:2437](),[4.2437][4.270:320]()
    $jobset->update({lastcheckedtime => time});
    setJobsetError($jobset, $checkError);
    [3.1241]
    [2.647]
    $jobset->update({lastcheckedtime => $eventTime});
    setJobsetError($jobset, $checkError, $eventTime);