Schema: add errorMsg, errorTime to JobsetEvals

[?]
Jan 21, 2021, 2:36 PM
SVDYZSZCLZX77OM4W4XK5ODTVZQ6VTRTMHXOFXO65WZNFZPQAG2AC

Dependencies

  • [2] NZXX6PLD Remove the Jobs table
  • [3] IGR322YP sql: Generate models from postgresql
  • [4] KPZNJ33U * In views, support selecting a job that doesn't depend on the
  • [5] MWXDVTS3 Copy the flake migration from the flake branch
  • [6] G2T4WAHI Store the inputs of each evaluation in the database
  • [7] BQHDSG6O Merge remote-tracking branch 'origin/master' into flake
  • [8] SB2V735V Keep track of the database schema version
  • [9] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [10] AZCCANUB Missing part of aaacf9eda36f5cdcc77cec20d6f49fbb6f925105
  • [11] SW7STLQ7 Cache flake-based jobset evaluations
  • [12] LZVO64YG Merge in the first bits of the API work
  • [*] 5SHCWE7X * Prevent repeated evaluation of a jobset with the same inputs. This
  • [*] JM3DPYOM generated schema with new dbix class schema loader, grrrrrr
  • [*] RFE6T5LG * Store jobset evaluations in the database explicitly. This includes
  • [*] N22GPKYT * Put info about logs / build products in the DB.
  • [*] 3PNG7NIB Remove trailing whitespace
  • [*] D5QIOJGP * Move everything up one directory.

Change contents

  • edit in src/lib/Hydra/Schema/JobsetEvals.pm at line 56
    [15.16269]
    [15.16283]
    =head2 errormsg
    data_type: 'text'
    is_nullable: 1
    =head2 errortime
    data_type: 'integer'
    is_nullable: 1
  • edit in src/lib/Hydra/Schema/JobsetEvals.pm at line 121
    [3.17821]
    [16.3788]
    "errormsg",
    { data_type => "text", is_nullable => 1 },
    "errortime",
    { data_type => "integer", is_nullable => 1 },
  • replacement in src/lib/Hydra/Schema/JobsetEvals.pm at line 218
    [3.18354][2.2665:2807]()
    # Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-05-27 17:40:41
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M61ikfnjORU7jDAH8P/j7w
    [3.18354]
    [3.1674]
    # Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 11:13:38
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zDBtAFc4HiFUcL/TpkuCcg
  • edit in src/sql/hydra.sql at line 443
    [18.37681]
    [16.6719]
    errorMsg text, -- error output from the evaluator
    errorTime integer, -- timestamp associated with errorMsg
  • file addition: upgrade-70.sql (----------)
    [19.3004]
    ALTER TABLE JobsetEvals
    ADD COLUMN errorMsg text,
    ADD COLUMN errorTime integer NULL;
    -- Copy the current error in jobsets to the latest field in jobsetevals
    UPDATE jobsetevals
    SET errorMsg = j.errorMsg,
    errorTime = j.errorTime
    FROM (
    SELECT
    jobsets.errorMsg,
    jobsets.errorTime,
    jobsets.id AS jobset_id,
    latesteval.id AS eval_id
    FROM jobsets
    LEFT JOIN
    (
    SELECT
    MAX(id) AS id,
    project,
    jobset
    FROM jobsetevals
    GROUP BY project, jobset
    ORDER BY project, jobset
    )
    AS latesteval
    ON
    jobsets.name = latesteval.jobset
    AND jobsets.project = latesteval.project
    WHERE latesteval.id IS NOT NULL
    ORDER BY jobsets.id
    )
    AS j
    WHERE id = j.eval_id;