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

jira-plugin generating message in the wrong ticket

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • jira-plugin
    • None

      As I have reported previously by chat, we are experiencing some strange behaviour in JIRA plugin at times. We have somewhat recently started using jira plugin to allow jenkins users to select the relevant jira issue when running the jobs.

      In the jenkins job, the parameter configuration is like !!

      and on the Post-build Actions we have a "Update relevant JIRA issues" action, as shown in !!

      In the JIRA ticket we can see the user fire the job #1803 (there is a typo in the copy paste, but I double checked that), and we have no message whatsoever of that job, but we do have a message from the job #1806:

      !!

        1. screenshot-1.png
          screenshot-1.png
          33 kB
        2. snapshot138.png
          snapshot138.png
          13 kB
        3. snapshot139.png
          snapshot139.png
          3 kB
        4. snapshot140.png
          snapshot140.png
          118 kB

          [JENKINS-32560] jira-plugin generating message in the wrong ticket

          hi davidbrown92, we are currently running:

          • Jenkins ver. 1.642
          • JIRA plugin 2.1 (2.2 is out there, going to update soon)

          Alexei Znamensky added a comment - hi davidbrown92 , we are currently running: Jenkins ver. 1.642 JIRA plugin 2.1 (2.2 is out there, going to update soon)

          Thank you for your update, alexeiz.

          David Brown added a comment - Thank you for your update, alexeiz .

          We are seeing two different formats to the message. A valid message has multiple lines including the JIRA reference, commit comments and changeset details. Incorrect (misleading) messages contain a single line “SUCCESS: Integrated in PROJECT #BuildNum”.
          The following image shows a good followed by a bad message as seen on a single JIRA ticket:

          We are using Jenkins version 1.598, JIRA Version v6.3.15 and JIRA plugin version 1.38.

          Can someone please confirm whether this is a known issue?

          David Brown added a comment - We are seeing two different formats to the message. A valid message has multiple lines including the JIRA reference, commit comments and changeset details. Incorrect (misleading) messages contain a single line “SUCCESS: Integrated in PROJECT #BuildNum”. The following image shows a good followed by a bad message as seen on a single JIRA ticket: We are using Jenkins version 1.598, JIRA Version v6.3.15 and JIRA plugin version 1.38. Can someone please confirm whether this is a known issue?

          Is this possible that there were concurrent builds running on the same jenkins slave when this happened?

          Radek Antoniuk added a comment - Is this possible that there were concurrent builds running on the same jenkins slave when this happened?

          Thank you for your response, Radek.
          That is possible, yes, as we do tend to have a number of builds running concurrently on the same slave.
          I have tried to investigate some recent examples but I'm struggling to find a pattern.
          I can only add that the issue is still happening. The "wrong entries" tend to follow some days after a valid entry in an earlier build of the same job. By this I mean we may have a valid (full) comment stating "Integrated in QA-17-1 #22" followed some days later by an invalid (abbreviated) comment "Integrated in QA-17-1 #23" (and some days after this a further an invalid comment "Integrated in QA-17-1 #28"). QA-17-1 builds are run once per day.

          David Brown added a comment - Thank you for your response, Radek. That is possible, yes, as we do tend to have a number of builds running concurrently on the same slave. I have tried to investigate some recent examples but I'm struggling to find a pattern. I can only add that the issue is still happening. The "wrong entries" tend to follow some days after a valid entry in an earlier build of the same job. By this I mean we may have a valid (full) comment stating "Integrated in QA-17-1 #22" followed some days later by an invalid (abbreviated) comment "Integrated in QA-17-1 #23" (and some days after this a further an invalid comment "Integrated in QA-17-1 #28"). QA-17-1 builds are run once per day.

          Interesting, so this might some other issue too, did you try with the latest version?

          Radek Antoniuk added a comment - Interesting, so this might some other issue too, did you try with the latest version?

          A month ago we upgraded to Jenkins 1.651.3 although we are still using JIRA plugin version 1.38. I acknowledge that I should consider updating to a newer version of the plugin.

          In the meantime I should update an earlier response I posted – we do NOT use concurrent builds. Apologies for the misinformation. Also, apologies for the delayed response - I don't get the time I need to focus on this issue.

          David Brown added a comment - A month ago we upgraded to Jenkins 1.651.3 although we are still using JIRA plugin version 1.38. I acknowledge that I should consider updating to a newer version of the plugin. In the meantime I should update an earlier response I posted – we do NOT use concurrent builds. Apologies for the misinformation. Also, apologies for the delayed response - I don't get the time I need to focus on this issue.

          Still thinking about it... could this be anyhow related to JENKINS-32884?

          Radek Antoniuk added a comment - Still thinking about it... could this be anyhow related to JENKINS-32884 ?

          Just to say that we're now on Jenkins 1.651.3 with Jira plugin v 2.3.1 and JIRA v7.2.7 and we still face this issue. We upgraded the Jira plugin a couple of weeks ago and initially I thought that the problem was resolved. However, there is a specific Jenkins job/project which has been hit three times in the past six builds. These builds have erroneously flagged some 1200+ JIRA tickets as having been included in the build and this has added around 80 minutes to the build time.

          I think I'm going to switch the option off for this specific job as people have reported being flooded with JIRA e-mail notifications.

          David Brown added a comment - Just to say that we're now on Jenkins 1.651.3 with Jira plugin v 2.3.1 and JIRA v7.2.7 and we still face this issue. We upgraded the Jira plugin a couple of weeks ago and initially I thought that the problem was resolved. However, there is a specific Jenkins job/project which has been hit three times in the past six builds. These builds have erroneously flagged some 1200+ JIRA tickets as having been included in the build and this has added around 80 minutes to the build time. I think I'm going to switch the option off for this specific job as people have reported being flooded with JIRA e-mail notifications.

          I've been looking into this further and trying to work out why some builds have posted comments to cases which are not in the build manifest. I noticed that for the affected builds they each have "Changes in dependency" showing under the Changes. I now see the help text "Selects all issues found in change lists or parameters of current build or in any of changed dependencies." for the Issue selector parameter of the "Update relevant issues" build step and I'm wondering if this is the source of my problem.
           
          Can anyone point me to any documentation for this parameter, please? I wonder if it is the "changed dependencies" that is throwing out all the unwanted JIRA comments and whether I could use an "Explicit selector" instead.
           
          Any help would be gratefully received.

          David Brown added a comment - I've been looking into this further and trying to work out why some builds have posted comments to cases which are not in the build manifest. I noticed that for the affected builds they each have "Changes in dependency" showing under the Changes. I now see the help text "Selects all issues found in change lists or parameters of current build or in any of changed dependencies ." for the Issue selector parameter of the "Update relevant issues" build step and I'm wondering if this is the source of my problem.   Can anyone point me to any documentation for this parameter, please? I wonder if it is the "changed dependencies" that is throwing out all the unwanted JIRA comments and whether I could use an "Explicit selector" instead.   Any help would be gratefully received.

            Unassigned Unassigned
            alexeiz Alexei Znamensky
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: