Handle job aliases in AggregateConstituents

[?]
Aug 27, 2013, 9:48 AM
JCJJKRWQN7XLV65FQEW4YBGI24IP6PFILISCMDWPXT7YEMEMDUAAC

Dependencies

  • [2] JTHWA6AM Rename aggregate members to constituents
  • [3] 3XTHEUMP * Implemented the clone feature.
  • [4] CQTN62OH Die tabs die
  • [5] A22P7HCO hydra: at evaluation, check if path is already built, and mark as built in stead of adding to the queue.
  • [6] QS4OX6Z7 Huuuge speedup in the Hydra evaluator
  • [7] RXVJFQ5A Evaluator cleanups
  • [8] INNOEHO6 * Fix getBuildLog for bzip2'd files.
  • [9] PMNWRTGJ Add multiple output support
  • [10] FTPCV25M Store aggregate members in the database
  • [11] RFE6T5LG * Store jobset evaluations in the database explicitly. This includes
  • [*] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate
  • [*] N22GPKYT * Put info about logs / build products in the DB.

Change contents

  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 436
    [3.793][3.1369:1450]()
    $buildMap->{$prevBuild->id} = { new => 0, drvPath => $drvPath };
    [3.793]
    [3.842]
    $buildMap->{$prevBuild->id} = { id => $prevBuild->id, jobName => $jobName, new => 0, drvPath => $drvPath };
  • replacement in src/lib/Hydra/Helper/AddBuilds.pm at line 509
    [3.5889][3.1524:1593]()
    $buildMap->{$build->id} = { new => 1, drvPath => $drvPath };
    [3.5889]
    [3.1593]
    $buildMap->{$build->id} = { id => $build->id, jobName => $jobName, new => 1, drvPath => $drvPath };
  • edit in src/script/hydra-evaluator at line 180
    [3.4843]
    [3.4843]
    while (my ($id, $x) = each %buildMap) {
    $ev->jobsetevalmembers->create({ build => $id, isnew => $x->{new} });
    }
    # Create AggregateConstituents mappings. Since there can
    # be jobs that alias each other, if there are multiple
    # builds for the same derivation, pick the one with the
    # shortest name.
  • replacement in src/script/hydra-evaluator at line 190
    [3.4924][3.4924:5061]()
    $ev->jobsetevalmembers->create({ build => $id, isnew => $x->{new} });
    $drvPathToId{$x->{drvPath}} = $id;
    [3.4924]
    [3.5061]
    my $y = $drvPathToId{$x->{drvPath}};
    if (defined $y) {
    next if length $x->{jobName} > length $y->{jobName};
    next if length $x->{jobName} == length $y->{jobName} && $x->{jobName} ge $y->{jobName};
    }
    $drvPathToId{$x->{drvPath}} = $x;
  • edit in src/script/hydra-evaluator at line 198
    [3.5076][2.2712:2765]()
    # Create AggregateConstituents mappings.
  • replacement in src/script/hydra-evaluator at line 200
    [2.2816][3.5217:5280](),[3.5217][3.5217:5280]()
    my $id = $drvPathToId{$job->{drvPath}} or die;
    [2.2816]
    [2.2817]
    my $x = $drvPathToId{$job->{drvPath}} or die;
  • replacement in src/script/hydra-evaluator at line 204
    [2.2999][2.2999:3131]()
    $db->resultset('AggregateConstituents')->update_or_create({aggregate => $id, constituent => $constituent});
    [2.2999]
    [3.5564]
    $db->resultset('AggregateConstituents')->update_or_create({aggregate => $x->{id}, constituent => $constituent->{id}});