• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • xvfb-plugin
    • None

      The docs say displayName is "(default) choosen by random"

      The code comments on the variable say "DISPLAY name, if NULL chosen by random."

      The actual contents of src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java L470 say that it will always use executor.getNumber() + displayNameOffset - which always returns displayNameOffset (default 1).

      As a result, DISPLAY is always 1.

      Using autoDisplayName is not an option, because it requires a version of Xvfb far too new for our builders (1.14 I think?)

          [JENKINS-26848] Does not actually randomize DISPLAY

          zregvart added a comment -

          Do you have different jobs for each of your daemons? If so use different offsets for each.

          I could find a way of adding slave into the mix, such that display number is based on slave, executor number and offset, would that help?

          zregvart added a comment - Do you have different jobs for each of your daemons? If so use different offsets for each. I could find a way of adding slave into the mix, such that display number is based on slave, executor number and offset, would that help?

          Jo Shields added a comment -

          Same jobs on both

          Jo Shields added a comment - Same jobs on both

          Code changed in jenkins
          User: Zoran Regvart
          Path:
          src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java
          src/main/resources/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper/help-displayName.html
          http://jenkins-ci.org/commit/xvfb-plugin/0aa3519c0b6c8dd21289a8df11cf8ae4db18801d
          Log:
          JENKINS-26848 Does not actually randomize DISPLAY

          Change the wording in the help to better reflect the actual display name
          generation

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Zoran Regvart Path: src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java src/main/resources/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper/help-displayName.html http://jenkins-ci.org/commit/xvfb-plugin/0aa3519c0b6c8dd21289a8df11cf8ae4db18801d Log: JENKINS-26848 Does not actually randomize DISPLAY Change the wording in the help to better reflect the actual display name generation

          Code changed in jenkins
          User: Zoran Regvart
          Path:
          src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java
          src/main/resources/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper/config.jelly
          src/main/resources/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper/help-parallelBuild.html
          http://jenkins-ci.org/commit/xvfb-plugin/259e422e60a33fa7b232b00bf8aeede354544ece
          Log:
          JENKINS-26848 Does not actually randomize DISPLAY

          Implement new feature for parallel builds, display names take
          100*computer index offset if used.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Zoran Regvart Path: src/main/java/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper.java src/main/resources/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper/config.jelly src/main/resources/org/jenkinsci/plugins/xvfb/XvfbBuildWrapper/help-parallelBuild.html http://jenkins-ci.org/commit/xvfb-plugin/259e422e60a33fa7b232b00bf8aeede354544ece Log: JENKINS-26848 Does not actually randomize DISPLAY Implement new feature for parallel builds, display names take 100*computer index offset if used.

          zregvart added a comment -

          I've released version 1.0.16-beta1 that you can try from the experimental update center (read about it at http://jenkins-ci.org/content/experimental-plugins-update-center).

          A new feature was added that helps with your situation called parallel builds, under Advanced settings of the job configuration you need to set I’m running this job in parallel on same node. With this set, an offset tied to the node the executor is running on is added into the calculation of the display name.

          In that case display name is 100 * node + executor + offset. For instance display name for a job running on slave 3 under executor 4 with offset of 20 will be 324.

          I would much appreciate if you could test the beta release and confirm if it works for you so that I can release the next version of the plugin.

          zregvart added a comment - I've released version 1.0.16-beta1 that you can try from the experimental update center (read about it at http://jenkins-ci.org/content/experimental-plugins-update-center ). A new feature was added that helps with your situation called parallel builds, under Advanced settings of the job configuration you need to set I’m running this job in parallel on same node . With this set, an offset tied to the node the executor is running on is added into the calculation of the display name. In that case display name is 100 * node + executor + offset. For instance display name for a job running on slave 3 under executor 4 with offset of 20 will be 324. I would much appreciate if you could test the beta release and confirm if it works for you so that I can release the next version of the plugin.

          Jo Shields added a comment -

          Amazing. I'll try that next time I'm near a computer - I'd rather not break a production system from a smartphone

          Jo Shields added a comment - Amazing. I'll try that next time I'm near a computer - I'd rather not break a production system from a smartphone

          Jo Shields added a comment -

          Jo Shields added a comment - Doesn't seem to be in http://ftp-chi.osuosl.org/pub/jenkins/updates/experimental/update-center.json or http://updates.jenkins-ci.org/download/plugins/xvfb/ - do you have a direct link to the .hpi I can use?

          Jo Shields added a comment -

          Never mind, I'm a big boy and I can build from a git tag.

          Seems to work - https://jenkins.mono-project.com/job/test-mono-mainline/993/label=debian-armhf/console and https://jenkins.mono-project.com/job/test-mono-mainline/993/label=debian-armel/console you can see one build using :1401 and one using :1501. Yay!

          Jo Shields added a comment - Never mind, I'm a big boy and I can build from a git tag. Seems to work - https://jenkins.mono-project.com/job/test-mono-mainline/993/label=debian-armhf/console and https://jenkins.mono-project.com/job/test-mono-mainline/993/label=debian-armel/console you can see one build using :1401 and one using :1501. Yay!

          zregvart added a comment -

          Thank you for testing, I'll make the release. The update centers are periodically updated so it should be under 24 hours until it's available in the regular update center...

          zregvart added a comment - Thank you for testing, I'll make the release. The update centers are periodically updated so it should be under 24 hours until it's available in the regular update center...

          zregvart added a comment -

          Closing old/resolved issue.

          zregvart added a comment - Closing old/resolved issue.

            zregvart zregvart
            directhex Jo Shields
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: