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

Currently building links point to wrong downstream projects when concurent builds are active

    Details

    • Similar Issues:

      Description

      We have a multijob job that manages a bunch of downstream jobs. All the jobs have concurrency enabled meaning they can have multiple builds going at the same time.

      When you look at a running multijob build, it will have links at the bottom saying what's running. However it seems if there are multiple builds running in the downstream job, the multijob build actually presents the status and the links to the last build of that downstream job, instead of the build the multijob job actually triggered.

      The console displays the correct build and status (saying the correct build has finished, etc).

        Attachments

          Activity

          Hide
          devin_linnington Devin Linnington added a comment -

          You are probably correct. The console output contains the correct links to the right build number, so the stuff generating the console output must be using a different method than project.getLastBuild(). Otherwise I would imagine the console would be having the same issue.

          Show
          devin_linnington Devin Linnington added a comment - You are probably correct. The console output contains the correct links to the right build number, so the stuff generating the console output must be using a different method than project.getLastBuild(). Otherwise I would imagine the console would be having the same issue.
          Hide
          asmundo Asmund Ostvold added a comment -

          Having done some searching on the issue of downstream upstream build numbers it looks like it could be difficult only using numbers. One(execution) build can be triggered by multiple upstream builds.

          My suggestion is to hack in a build parameter ID that is generated unique for sub build. And then somehow match against this build parameter. But as I have already stated I do not know MultiJob and Jenkins internals at all.

          Show
          asmundo Asmund Ostvold added a comment - Having done some searching on the issue of downstream upstream build numbers it looks like it could be difficult only using numbers. One(execution) build can be triggered by multiple upstream builds. My suggestion is to hack in a build parameter ID that is generated unique for sub build. And then somehow match against this build parameter. But as I have already stated I do not know MultiJob and Jenkins internals at all.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Yoram Michaeli
          Path:
          src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java
          http://jenkins-ci.org/commit/tikal-multijob-plugin/c8c4eb7b24f59662489341bf1c04e280e2a03c21
          Log:
          Fix for issue JENKINS-14955 (which also duplicate with issue
          JENKINS-15965)


          You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com.
          For more options, visit https://groups.google.com/groups/opt_out.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Yoram Michaeli Path: src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java http://jenkins-ci.org/commit/tikal-multijob-plugin/c8c4eb7b24f59662489341bf1c04e280e2a03c21 Log: Fix for issue JENKINS-14955 (which also duplicate with issue JENKINS-15965 ) – You received this message because you are subscribed to the Google Groups "Jenkins Commits" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out .
          Hide
          devin_linnington Devin Linnington added a comment -

          Thanks, that line definitely looks like the problem

          Show
          devin_linnington Devin Linnington added a comment - Thanks, that line definitely looks like the problem
          Hide
          asmundo Asmund Ostvold added a comment -

          looking at the fix I would believe that all use of project.getLastBuild() should be removed. Think of the case where project is accepts concurrent builds. Then last build may very well be wrong. I still do not understand this fully I may very well be wrong.

          Show
          asmundo Asmund Ostvold added a comment - looking at the fix I would believe that all use of project.getLastBuild() should be removed. Think of the case where project is accepts concurrent builds. Then last build may very well be wrong. I still do not understand this fully I may very well be wrong.

            People

            • Assignee:
              yorammi Yoram Michaeli
              Reporter:
              devin_linnington Devin Linnington
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: