Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30182

view-job-filters plugin, parameterized jobs filter, does not work. exceptions thrown from build filter (wrapper) column

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Jenkins 1.609.2 LTS with view-job-filters plugin 1.27 (plugin includes build filter (wrapper) column). Other plugins are up-to-date w.r.t. LTS versions.
      Oracle Java 7u75
    • 2.2

      Jenkins 1.609.2 LTS with view-job-filters plugin 1.27 (plugin includes build filter (wrapper) column). Other plugins are up-to-date w.r.t. LTS versions. Oracle Java 7u75.

      See also JENKINS-21862

      1. Add a new list view (in "My Views")
      Select "filter build queue" and "filter build executors"
      "job filters" - All selected jobs. Do not select projects by checkbox.
      Do select "Use regex to include jobs into the view" and enter regex.
      Add new column "build parameters", showing value of parameter GERRIT_BRANCH.

      Result:
      (a) The view includes the expected list of projects selected by job name, with GERRIT_BRANCH column showing different values depending on the last completed build of each project. Good.

      2. Edit view and add a new "parameterized jobs filter" - parameter name is "GERRIT_BRANCH", matching value is "RB12.34", all options un-checked, match type is "exclude unmatched"

      Result:
      (a) The view's project list includes fewer projects, only those where GERRIT_BRANCH matched RB12.34 in the last completed build. Good.

      (b) The Build History only includes builds where GERRIT_BRANCH matched. Good.

      3. Edit view, go to parameterized jobs filter, select "match against this many previous builds", blank or zero for all

      Result:
      (a) The view's project list includes more projects, with GERRIT_BRANCH column showing different values depending on the last completed build of each project. Good.

      (b) The Build History now includes builds that should have been filtered by the parameterized jobs filter. Bad.

      4. Edit view and add a new build filter (wrapper) column, select "build parameters", show the single parameter GERRIT_BRANCH. This is the same as the column we added before, except this is inside the build filter wrapper.

      Result:
      (a) the new filtered build parameters column is empty, when it should show the same GERRIT_BRANCH as the unfiltered Build Parameters column. Bad.

      (b) The jenkins server log shows exceptions like below, one for each project in the View's project list:
      Aug 25, 2015 9:35:10 AM WARNING hudson.ExpressionFactory2$JexlExpression evaluate
      Caught exception evaluating: it.getBuildParameters(job) in /user/haha/my-views/view/hoho/. Reason: java.lang.IllegalStateException: /local/opt/jenkins/8060/jenkins_home/jobs/full-SC-w2012-vc12-x86/builds/833 already existed; will not overwite with full-SC-w2012-vc12-x86 #833
      java.lang.IllegalStateException: /local/opt/jenkins/8060/jenkins_home/jobs/full-SC-w2012-vc12-x86/builds/833 already existed; will not overwite with full-SC-w2012-vc12-x86 #833
      at hudson.model.RunMap.put(RunMap.java:187)
      at hudson.views.BuildFilterColumn$JobWrapper._getRuns(BuildFilterColumn.java:125)
      at hudson.model.Job.getLastBuild(Job.java:858)
      at jenkins.plugins.extracolumns.BuildParametersColumn.getBuildParameters(BuildParametersColumn.java:63)
      ... much more traceback

            jglick Jesse Glick
            hushp1pt Tony Wallace
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: