Cleanup eval serialization

[?]
Oct 24, 2013, 7:38 PM
MQYHIUEEIMJHLABLHRJTJSHITJMHRHMF7NACHRD7QRBJCA3GQPRQC

Dependencies

  • [2] 4VYSDP4I Add eager fetching of relations and enable that for jobset->jobsetinputs
  • [3] LZVO64YG Merge in the first bits of the API work
  • [4] VH5ZABDR Add a page to show the latest evaluations for the entire server
  • [5] G2T4WAHI Store the inputs of each evaluation in the database
  • [6] 7ECJWNVX Cleanup Project model
  • [7] YI3BZG5N Cleanup Jobset serialization
  • [8] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [9] SYLVCTT6 Start api cleanup with the User model
  • [10] U4TD3AIQ Add support for viewing jobset evaluations
  • [11] KYSBJAYN Allow dashes in jobset input names
  • [*] 3HZY24CX * Make jobsets viewable under
  • [*] 5SHCWE7X * Prevent repeated evaluation of a jobset with the same inputs. This
  • [*] KPZNJ33U * In views, support selecting a job that doesn't depend on the

Change contents

  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 277
    [3.14376][3.14376:15188]()
    evals => [ $evals->search({ 'me.hasnewbuilds' => 1 }, {
    columns => [
    'me.hasnewbuilds',
    'me.id',
    'jobsetevalinputs.name',
    'jobsetevalinputs.altnr',
    'jobsetevalinputs.revision',
    'jobsetevalinputs.type',
    'jobsetevalinputs.uri',
    'jobsetevalinputs.dependency',
    'jobsetevalmembers.build',
    ],
    join => [ 'jobsetevalinputs', 'jobsetevalmembers' ],
    collapse => 1,
    rows => $resultsPerPage,
    offset => $offset,
    order_by => "me.id DESC",
    }) ],
    [3.14376]
    [3.15188]
    evals => $c->stash->{evals},
  • edit in src/lib/Hydra/Schema/JobsetEvalInputs.pm at line 171
    [3.30581]
    [3.2651]
    my %hint = (
    columns => [
    "revision"
    ],
    );
  • edit in src/lib/Hydra/Schema/JobsetEvalInputs.pm at line 178
    [3.2652]
    [3.2652]
    sub json_hint {
    return \%hint;
    }
  • edit in src/lib/Hydra/Schema/JobsetEvalInputs.pm at line 182
    [3.2653][3.2653:2752]()
    # You can replace this text with custom code or comments, and it will be preserved on regeneration
  • edit in src/lib/Hydra/Schema/JobsetEvals.pm at line 201
    [15.1847]
    [14.1277]
    my %hint = (
    columns => [
    "hasnewbuilds",
    "id"
    ],
    relations => {
    "builds" => "id"
    },
    eager_relations => {
    # altnr? Does anyone care?
    jobsetevalinputs => "name"
    }
    );
  • edit in src/lib/Hydra/Schema/JobsetEvals.pm at line 216
    [14.1278]
    [14.1368]
    sub json_hint {
    return \%hint;
    }
  • replacement in tests/api-test.pl at line 3
    [3.36481][2.356:386]()
    use Test::Simple tests => 10;
    [3.36481]
    [3.2064]
    use Test::Simple tests => 13;
  • edit in tests/api-test.pl at line 50
    [3.245][2.598:613](),[2.613][3.38519:38520](),[3.744][3.38519:38520](),[3.38519][3.38519:38520]()
    =begin comment
  • replacement in tests/api-test.pl at line 55
    [3.38939][3.38939:39016]()
    ok($eval->{hasnewbuilds} == 1, "The first eval of a jobset has new builds");
    [3.38939]
    [3.39016]
    ok($eval->{eval}->{hasnewbuilds} == 1, "The first eval of a jobset has new builds");
  • replacement in tests/api-test.pl at line 61
    [3.39401][3.39401:39556]()
    ok($evals->[0]->{jobsetevalinputs}->[0]->{revision} != $evals->[1]->{jobsetevalinputs}->[0]->{revision}, "Changing a jobset source changes its revision");
    [3.39401]
    [3.39556]
    ok($evals->[0]->{eval}->{jobsetevalinputs}->{"my-src"}->{revision} != $evals->[1]->{eval}->{jobsetevalinputs}->{"my-src"}->{revision}, "Changing a jobset source changes its revision");
    =begin comment