Disallow multiple jobs with the same name

[?]
Sep 24, 2014, 4:12 PM
R42G3IBQUDLFWG65UX7T35MI4KTUTHNWU5EABND3N7XB66GTBQIAC

Dependencies

  • [2] P76HTFOD Revert "Remove wacky "sysbuild" filtering"
  • [3] 3XTHEUMP * Implemented the clone feature.
  • [4] AKRVETP5 Handle UTF-8 characters in eval error messages
  • [5] YFPZ46YK * hydra: added variant of build input type, 'build output (same system)' to allow better continous integration in one jobset for multiple system. it makes sure that the system of the build that is passed as input for a job has the same system as the job.
  • [6] D7GTR6PP Remove wacky "sysbuild" filtering
  • [7] PMNWRTGJ Add multiple output support
  • [8] SRBU2RAE Warn against multiple jobs with the same name
  • [*] OOQ2D3KC * Refactoring: move fetchInput out of hydra_scheduler into a separate

Change contents

  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 354
    [3.3393]
    [2.0]
    my %jobNames;
    my $errors;
  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 358
    [2.67]
    [2.67]
    # Ensure that there is only one job with the given
    # name. FIXME: this check will become unnecessary after we
    # remove support for multiple values per jobset input.
    if (defined $jobNames{$job->{jobName}}) {
    $errors .= "error: there are multiple jobs named ‘$job->{jobName}’\n\n";
    next;
    }
    $jobNames{$job->{jobName}} = 1;
  • edit in src/lib/Hydra/Helper/AddBuilds.pm at line 375
    [2.401][2.401:402](),[2.402][3.0:303](),[3.3393][3.0:303]()
    my %jobNames;
    my $errors;
    foreach my $job (@{$jobs->{job}}) {
    $jobNames{$job->{jobName}}++;
    if ($jobNames{$job->{jobName}} == 2) {
    $errors .= "warning: there are multiple jobs named ‘$job->{jobName}’; support for this will go away soon!\n\n";
    }
    }