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

Labels/Node tree is not visible in multiconfiguration project setup

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • matrix-project-plugin
    • None
    • Windows 7 Ultimate, Google Chrome 11.0.696.65 (Jenkins 1.411 or later - possibly earlier, definitely didn't show up in 1.400)

      When I try and setup a multi-configuration project using the Slaves as the axis, the Labels/Nodes tree area has nothing in it for me to select a label or
      node for the axis. The javascript code is there when I view source, but nothing shows up to allow me to set the axis for the slaves.

      The code inside the tree element is as follows:

      <script>
      hudsonRules["DIV.labelAxis-tree"] = function(e) {
      var tree = new YAHOO.widget.TreeView(e);

      var labels = new YAHOO.widget.TextNode("Labels", tree.getRoot(), false);
      var machines = new YAHOO.widget.TextNode("Individual nodes", tree.getRoot(), false);

      var values = (e.getAttribute("values") || "").split("/");
      function has(v)

      { return values.include(v) ? 'checked="checked" ' : ""; }

      new YAHOO.widget.TextNode("<input type=\'checkbox\' name=\'values\' json=\'master\' "has("master")"/><label class=\'attach-previous\'>master (the master Jenkins node)</label>", machines, false);

      new YAHOO.widget.TextNode("<input type=\'checkbox\' name=\'values\' json=\'slave\' "has("slave")"/><label class=\'attach-previous\'>slave (group of sv-build-03,sv-build-02)</label>", labels, false);

      new YAHOO.widget.TextNode("<input type=\'checkbox\' name=\'values\' json=\'sv-build-02\' "has("sv-build-02")"/><label class=\'attach-previous\'>sv-build-02 (Slave Build Server #1)</label>", machines, false);

      new YAHOO.widget.TextNode("<input type=\'checkbox\' name=\'values\' json=\'sv-build-03\' "has("sv-build-03")"/><label class=\'attach-previous\'>sv-build-03 (Slave Build Server #2)</label>", machines, false);

      tree.draw();

      tree.expandAll();
      tree.collapseAll();
      };
      </script>

      No javascript errors are shown on the javascript console.

          [JENKINS-9689] Labels/Node tree is not visible in multiconfiguration project setup

          WH added a comment -

          I have the same problem with Jenkins 1.411 and Firefox 4.01. The Firefox error console says:

          Error: Components is not defined
          Source file: chrome://qls/content/qls.js
          Line: 74

          Does Jenkins recognize Firefox as Chrome?

          WH added a comment - I have the same problem with Jenkins 1.411 and Firefox 4.01. The Firefox error console says: Error: Components is not defined Source file: chrome://qls/content/qls.js Line: 74 Does Jenkins recognize Firefox as Chrome?

          Alex Earl added a comment -

          chrome in the case of the URL you are pasting means the browsers "chrome" or set of UI elements. Most browsers use internal URL's starting with chrome:// to setup windows and implement functionality. http://www.pcmag.com/encyclopedia_term/0,2542,t=browser+chrome&i=38972,00.asp

          Alex Earl added a comment - chrome in the case of the URL you are pasting means the browsers "chrome" or set of UI elements. Most browsers use internal URL's starting with chrome:// to setup windows and implement functionality. http://www.pcmag.com/encyclopedia_term/0,2542,t=browser+chrome&i=38972,00.asp

          Jim McCaskey added a comment -

          Repost from the mailing list:

          I am trying to set up a new Jeninks server and running into a problem. I have configured 5 (2 windows, 2 linux, 1 mac) slaves with the system. I have created a "multi-configuration project". In that project I then try to:

          1) Drop down the "Add Axis" drop down
          2) Choose Slaves
          3) Notice that the Node/Label box is empty

          The system I am noticing this on is installed via yum on Red Hat Enterprise Linux Server release 5.6. I am using Jenkins version 1.412 with Java 1.6.0_25 (64-bit). On the theory it could be a browser problem I tried IE9, FireFox4, and Chrome 10.0.648.205.

          I was able to get around this by:

          1) Shutting down Jenkins
          2) Modifying the config.xml for the job directly
          3) Restarting Jenkins

          Now I can see all of the slaves and am able to modify them at will. I can reproduce the problem by creating a new "multi-configuration project". I have two other Jenkins servers running Jenkins version 1.400. Both of them have no problem with the "multi-configuration project".

          I'm not too certain what's going on here, but thought I should mention it. Needless to say, the work around would really only work on a lightly used Jenkins server.

          Jim McCaskey added a comment - Repost from the mailing list: I am trying to set up a new Jeninks server and running into a problem. I have configured 5 (2 windows, 2 linux, 1 mac) slaves with the system. I have created a "multi-configuration project". In that project I then try to: 1) Drop down the "Add Axis" drop down 2) Choose Slaves 3) Notice that the Node/Label box is empty The system I am noticing this on is installed via yum on Red Hat Enterprise Linux Server release 5.6. I am using Jenkins version 1.412 with Java 1.6.0_25 (64-bit). On the theory it could be a browser problem I tried IE9, FireFox4, and Chrome 10.0.648.205. I was able to get around this by: 1) Shutting down Jenkins 2) Modifying the config.xml for the job directly 3) Restarting Jenkins Now I can see all of the slaves and am able to modify them at will. I can reproduce the problem by creating a new "multi-configuration project". I have two other Jenkins servers running Jenkins version 1.400. Both of them have no problem with the "multi-configuration project". I'm not too certain what's going on here, but thought I should mention it. Needless to say, the work around would really only work on a lightly used Jenkins server.

          davidstrauss added a comment -

          This is affecting me, too, on 1.413. One important note, though, is that old jobs with multiconfiguration properly show the widget.

          davidstrauss added a comment - This is affecting me, too, on 1.413. One important note, though, is that old jobs with multiconfiguration properly show the widget.

          Andrew Bayer added a comment -

          Andrew Bayer added a comment - Wondering if this may be a side effect of https://github.com/jenkinsci/jenkins/commit/8d29f4772bfdba66e72af3ae245b306d6b0bebca?

          This also blocks our jenkins 1.413 installation!

          Conny Kreyßel added a comment - This also blocks our jenkins 1.413 installation!

          Thomas Fields added a comment -

          I've just been bitten by this issue too. Is there a fix in the works?

          Thomas Fields added a comment - I've just been bitten by this issue too. Is there a fix in the works?

          Alex Earl added a comment -

          Jim,

          Can you post the changes you made to the config.xml to allow you to setup the matrix job? I would like to try out some matrix stuff, but I don't know what needs to be in the config.xml for it.

          Thanks,

          slide

          Alex Earl added a comment - Jim, Can you post the changes you made to the config.xml to allow you to setup the matrix job? I would like to try out some matrix stuff, but I don't know what needs to be in the config.xml for it. Thanks, slide

          Jim McCaskey added a comment -

          It was awhile ago now that I hacked at this, but I think I added these elements to my config.xml:

            <axes>
              <hudson.matrix.LabelAxis>
                <name>label</name>
                <values>
                  <string>slave1</string>
                  <string>slave2</string>
                </values>
              </hudson.matrix.LabelAxis>
            </axes>
          

          That populated the drop down so I could move forward. Since then I have been copying projects so it has "just worked". I was actually able to copy that from another project that was already working on a different Jenkins server.

          I should probably mention to backup your config.xml before hacking at it.

          Jim McCaskey added a comment - It was awhile ago now that I hacked at this, but I think I added these elements to my config.xml: <axes> <hudson.matrix.LabelAxis> <name>label</name> <values> <string>slave1</string> <string>slave2</string> </values> </hudson.matrix.LabelAxis> </axes> That populated the drop down so I could move forward. Since then I have been copying projects so it has "just worked". I was actually able to copy that from another project that was already working on a different Jenkins server. I should probably mention to backup your config.xml before hacking at it.

          Fred G added a comment -

          Same problem here with 1.413.

          Fred G added a comment - Same problem here with 1.413.

          Alex Earl added a comment -

          It works on 1.410, but does not on 1.411. I will do some git bisecting to see if I can determine what commit caused the problem.

          Alex Earl added a comment - It works on 1.410, but does not on 1.411. I will do some git bisecting to see if I can determine what commit caused the problem.

          Alex Earl added a comment -

          After doing a bisect between jenkins-1_410 and jenkins-1_411 I got to the following:

          8d29f4772bfdba66e72af3ae245b306d6b0bebca is the first bad commit
          commit 8d29f4772bfdba66e72af3ae245b306d6b0bebca
          Author: Kohsuke Kawaguchi <kk@kohsuke.org>
          Date: Tue Apr 26 17:38:21 2011 -0700

          Some of our tags, such as <optionalBlock> and <dropdownList> involves grouping of sibling table rows, and controlling visibility of them. So when such tags nest to each other, the visibility updates need to be done carefully, or else the visibility could get out of sync with the model (imagine outer group is made visible while inner group is not visible — if all the rows are simply enumerated and visibility changed, we end up making the inner group visible.)

          The rowVisibilityGroup object in hudson-behavior.js is used to coordinate this activity, and this test ensures that it's working.

          :100644 100644 f1ea624a8b4b1146cf7586ec69ca782a31cf1e71 2e42b3cb89a1d77879d4c0dfa16b43fc48daf503 M changelog.html
          :040000 040000 b32cde6cadfb1a86360283e15baef4108884607f 5c6ca71e431756cfbdc74934cedb3e0d60e8e645 M core
          :040000 040000 92dcb171360e5d1f17f568a28ce09e332e76e103 b0ab3686496289c1e1a5506e4dc0e11f238f7fd4 M test
          :040000 040000 a154d66133a8e479898fb9171c15e8f1e3065880 947045f4f7f6ac97b65b849ddc07f0d70992eda7 M war

          Alex Earl added a comment - After doing a bisect between jenkins-1_410 and jenkins-1_411 I got to the following: 8d29f4772bfdba66e72af3ae245b306d6b0bebca is the first bad commit commit 8d29f4772bfdba66e72af3ae245b306d6b0bebca Author: Kohsuke Kawaguchi <kk@kohsuke.org> Date: Tue Apr 26 17:38:21 2011 -0700 Some of our tags, such as <optionalBlock> and <dropdownList> involves grouping of sibling table rows, and controlling visibility of them. So when such tags nest to each other, the visibility updates need to be done carefully, or else the visibility could get out of sync with the model (imagine outer group is made visible while inner group is not visible — if all the rows are simply enumerated and visibility changed, we end up making the inner group visible.) The rowVisibilityGroup object in hudson-behavior.js is used to coordinate this activity, and this test ensures that it's working. :100644 100644 f1ea624a8b4b1146cf7586ec69ca782a31cf1e71 2e42b3cb89a1d77879d4c0dfa16b43fc48daf503 M changelog.html :040000 040000 b32cde6cadfb1a86360283e15baef4108884607f 5c6ca71e431756cfbdc74934cedb3e0d60e8e645 M core :040000 040000 92dcb171360e5d1f17f568a28ce09e332e76e103 b0ab3686496289c1e1a5506e4dc0e11f238f7fd4 M test :040000 040000 a154d66133a8e479898fb9171c15e8f1e3065880 947045f4f7f6ac97b65b849ddc07f0d70992eda7 M war

          Alex Earl added a comment - - edited

          Actually, it looks like the behavior isn't in hudsonRules when the applySubtree is called. Other users have mentioned that they can't register new behaviors on 1.414 in their plugins either.

          Alex Earl added a comment - - edited Actually, it looks like the behavior isn't in hudsonRules when the applySubtree is called. Other users have mentioned that they can't register new behaviors on 1.414 in their plugins either.

          Alex Earl added a comment -

          Alex Earl added a comment - Fixed in https://github.com/jenkinsci/jenkins/pull/157

          Alex Earl added a comment -

          As a workaround to this issue, if you shut down your Jenkins instance, open up the war file using an archiver (I used 7zip in my case on windows) and edit scripts/hudson-behavior.js. In the renderOnDemand function make the following patch:

          }
          Element.remove(e);

          + t.responseText.evalScripts();

          Behaviour.applySubtree(elements,true);

          if (callback) callback(t);

          Alex Earl added a comment - As a workaround to this issue, if you shut down your Jenkins instance, open up the war file using an archiver (I used 7zip in my case on windows) and edit scripts/hudson-behavior.js. In the renderOnDemand function make the following patch: } Element.remove(e); + t.responseText.evalScripts(); Behaviour.applySubtree(elements,true); if (callback) callback(t);

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/2b14fe3de5812ecd6b0cf4e69bdc44f229aa8aef
          Log:
          Merge pull request #157 from slide/master

          [FIXED JENKINS-9689]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/2b14fe3de5812ecd6b0cf4e69bdc44f229aa8aef Log: Merge pull request #157 from slide/master [FIXED JENKINS-9689]

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/e669d8cc85db24718b0b4838d762a7b034f5ce13
          Log:
          [FIXED JENKINS-9689]
          backporting this from the trunk.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/e669d8cc85db24718b0b4838d762a7b034f5ce13 Log: [FIXED JENKINS-9689] backporting this from the trunk.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #889
          [FIXED JENKINS-9689]

          Kohsuke Kawaguchi : e669d8cc85db24718b0b4838d762a7b034f5ce13
          Files :

          • war/src/main/webapp/scripts/hudson-behavior.js
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #889 [FIXED JENKINS-9689] Kohsuke Kawaguchi : e669d8cc85db24718b0b4838d762a7b034f5ce13 Files : war/src/main/webapp/scripts/hudson-behavior.js changelog.html

          Code changed in jenkins
          User: slide
          Path:
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/015c227dfff347616ca3b16f4bee1a6ced5434d2
          Log:
          Fix JENKINS-9689

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: slide Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/015c227dfff347616ca3b16f4bee1a6ced5434d2 Log: Fix JENKINS-9689

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/2b14fe3de5812ecd6b0cf4e69bdc44f229aa8aef
          Log:
          Merge pull request #157 from slide/master

          [FIXED JENKINS-9689]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/2b14fe3de5812ecd6b0cf4e69bdc44f229aa8aef Log: Merge pull request #157 from slide/master [FIXED JENKINS-9689]

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/e669d8cc85db24718b0b4838d762a7b034f5ce13
          Log:
          [FIXED JENKINS-9689]
          backporting this from the trunk.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/e669d8cc85db24718b0b4838d762a7b034f5ce13 Log: [FIXED JENKINS-9689] backporting this from the trunk.

          Code changed in jenkins
          User: slide
          Path:
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/015c227dfff347616ca3b16f4bee1a6ced5434d2
          Log:
          Fix JENKINS-9689

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: slide Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/015c227dfff347616ca3b16f4bee1a6ced5434d2 Log: Fix JENKINS-9689

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/2b14fe3de5812ecd6b0cf4e69bdc44f229aa8aef
          Log:
          Merge pull request #157 from slide/master

          [FIXED JENKINS-9689]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/2b14fe3de5812ecd6b0cf4e69bdc44f229aa8aef Log: Merge pull request #157 from slide/master [FIXED JENKINS-9689]

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          war/src/main/webapp/scripts/hudson-behavior.js
          http://jenkins-ci.org/commit/jenkins/e669d8cc85db24718b0b4838d762a7b034f5ce13
          Log:
          [FIXED JENKINS-9689]
          backporting this from the trunk.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html war/src/main/webapp/scripts/hudson-behavior.js http://jenkins-ci.org/commit/jenkins/e669d8cc85db24718b0b4838d762a7b034f5ce13 Log: [FIXED JENKINS-9689] backporting this from the trunk.

            kohsuke Kohsuke Kawaguchi
            slide_o_mix Alex Earl
            Votes:
            12 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: