* In views, support selecting a job that doesn't depend on the

[?]
Mar 5, 2010, 5:20 PM
KPZNJ33UUF6TK5OPB6K5KLM3ZEK7YV3IF32HTLJFURCO6ICDMGYAC

Dependencies

  • [2] RFE6T5LG * Store jobset evaluations in the database explicitly. This includes
  • [3] ID5DHUFU * Cleanup.
  • [4] PPJN6SDP * paging for releases page
  • [5] IN272KZW * Automatically keep all builds in the latest successful release in
  • [6] 2BUX775I * More release -> view.
  • [7] P5X4P6VK * Renaming "release sets" to "views" (not finished yet). Having
  • [8] XBU2ODSP * More renaming.
  • [*] 2GK5DOU7 * Downloading closures.
  • [*] 5SHCWE7X * Prevent repeated evaluation of a jobset with the same inputs. This

Change contents

  • replacement in src/lib/Hydra/Controller/View.pm at line 95
    [4.3431][4.3431:3480]()
    my $page = int($c->req->param('page')) || 1;
    [4.3431]
    [4.3480]
    my $page = int($c->req->param('page') || "1") || 1;
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 160
    [4.1677][4.1677:1706]()
    my ($builds, $job) = @_;
    [4.1677]
    [4.1706]
    my ($ev, $depBuilds, $job) = @_;
  • edit in src/lib/Hydra/Helper/Nix.pm at line 162
    [4.1725]
    [4.1827]
    my $project = $job->get_column('project');
    my $jobset = $job->get_column('jobset');
    # If the job is in the same jobset as the primary build, then
    # search for a build of the job among the members of the jobset
    # evaluation ($ev) that produced the primary build.
    if (defined $ev && $project eq $ev->get_column('project')
    && $jobset eq $ev->get_column('jobset'))
    {
    $thisBuild = $ev->builds->find(
    { job => $job->get_column('job'), finished => 1 },
    { join => 'resultInfo', rows => 1
    , order_by => ["id"]
    , where => \ attrsToSQL($job->attrs, "build.id")
    , '+select' => ["resultInfo.buildstatus"], '+as' => ["buildstatus"]
    });
    }
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 181
    [4.1828][4.1726:1942](),[4.1942][3.0:87]()
    # Find a build of this job that had the primary build
    # as input. If there are multiple, prefer successful
    # ones, and then oldest. !!! order_by buildstatus is hacky
    ($thisBuild) = $builds->search(
    { project => $job->get_column('project'), jobset => $job->get_column('jobset')
    [4.1828]
    [3.87]
    # As backwards compatibility, find a build of this job that had
    # the primary build as input. If there are multiple, prefer
    # successful ones, and then oldest. !!! order_by buildstatus is
    # hacky
    $thisBuild = $depBuilds->find(
    { project => $project, jobset => $jobset
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 193
    [3.381][3.381:393]()
    });
    [3.381]
    [4.2396]
    })
    unless defined $thisBuild;
  • edit in src/lib/Hydra/Helper/Nix.pm at line 207
    [4.1936]
    [4.1073]
    # Get the jobset evaluation of which the primary build is a
    # member. If there are multiple, pick the oldest one (i.e. the
    # lowest id). (Note that for old builds in the database there
    # might not be a evaluation record, so $ev may be undefined.)
    my $ev = $primaryBuild->jobsetevalmembers->find({}, { rows => 1, order_by => "eval" });
    $ev = $ev->eval if defined $ev;
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 221
    [3.462][3.462:543]()
    : findLastJobForBuilds(scalar $primaryBuild->dependentBuilds, $job);
    [3.462]
    [4.2740]
    : findLastJobForBuilds($ev, scalar $primaryBuild->dependentBuilds, $job);
  • edit in src/lib/Hydra/Schema/JobsetEvals.pm at line 198
    [2.4788]
    [11.1277]
    __PACKAGE__->has_many(
    "buildIds",
    "Hydra::Schema::JobsetEvalMembers",
    { "foreign.eval" => "self.id" },
    );
    __PACKAGE__->many_to_many(builds => 'buildIds', 'build');