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

If Updater fails to update due to missing permission, it crashes and never flushes the comment queue

    XMLWordPrintable

Details

    Description

      If the user does not have the appropriate permissions (in our case somebody referred to a read only issue), it crashes and will try again for the next build (it will post some more comments into the tickets that the user has permissions to and once it reaches the read-only issue ID, it will crash again, and so on)

      The problem lies here:
      https://github.com/jenkinsci/jira-plugin/blob/master/src/main/java/hudson/plugins/jira/Updater.java#L138

      According to the JIRA documentation, it should catch a RemoteException instead:

      com.atlassian.jira.rpc.soap.addComment

      Throws:

      • RemotePermissionException - If the user is not permitted to perform this operation in this context.
      • RemoteAuthenticationException - If the token is invalid or the SOAP session has timed out
      • RemoteException - If the issue does not exist or your dont have permission to see it

      Source:
      http://docs.atlassian.com/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html#addComment(java.lang.String, java.lang.String, com.atlassian.jira.rpc.soap.beans.RemoteComment)

      Attachments

        Issue Links

          Activity

            tpatja Teemu Patja added a comment -

            Is there any workaround for this? Manual way to flush the queue?

            It is causing massive amounts of spam for us

            tpatja Teemu Patja added a comment - Is there any workaround for this? Manual way to flush the queue? It is causing massive amounts of spam for us
            krulls Stephan Krull added a comment - see https://github.com/jenkinsci/jira-plugin/pull/50

            Code changed in jenkins
            User: krulls
            Path:
            src/main/java/hudson/plugins/jira/Updater.java
            src/main/resources/hudson/plugins/jira/Messages.properties
            src/main/resources/hudson/plugins/jira/Messages_de.properties
            src/test/java/hudson/plugins/jira/UpdaterTest.java
            http://jenkins-ci.org/commit/jira-plugin/28f559bb20417bccbb372ac38bda363971693f6f
            Log:
            JENKINS-17156: remove issue from carry over list after submitting the comment

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: krulls Path: src/main/java/hudson/plugins/jira/Updater.java src/main/resources/hudson/plugins/jira/Messages.properties src/main/resources/hudson/plugins/jira/Messages_de.properties src/test/java/hudson/plugins/jira/UpdaterTest.java http://jenkins-ci.org/commit/jira-plugin/28f559bb20417bccbb372ac38bda363971693f6f Log: JENKINS-17156 : remove issue from carry over list after submitting the comment

            Code changed in jenkins
            User: Radek Antoniuk
            Path:
            src/main/java/hudson/plugins/jira/Updater.java
            src/main/resources/hudson/plugins/jira/Messages.properties
            src/main/resources/hudson/plugins/jira/Messages_de.properties
            src/test/java/hudson/plugins/jira/UpdaterTest.java
            http://jenkins-ci.org/commit/jira-plugin/032295170d77eccb0ce6aaa4f829618a019ce78e
            Log:
            JENKINS-17156 - Remove issue from carry over list after successful comment submission
            Merge remote-tracking branch 'origin/pr/50'

            Conflicts:
            src/main/java/hudson/plugins/jira/Updater.java
            src/test/java/hudson/plugins/jira/UpdaterTest.java

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Radek Antoniuk Path: src/main/java/hudson/plugins/jira/Updater.java src/main/resources/hudson/plugins/jira/Messages.properties src/main/resources/hudson/plugins/jira/Messages_de.properties src/test/java/hudson/plugins/jira/UpdaterTest.java http://jenkins-ci.org/commit/jira-plugin/032295170d77eccb0ce6aaa4f829618a019ce78e Log: JENKINS-17156 - Remove issue from carry over list after successful comment submission Merge remote-tracking branch 'origin/pr/50' Conflicts: src/main/java/hudson/plugins/jira/Updater.java src/test/java/hudson/plugins/jira/UpdaterTest.java

            This should be merged from PR50, thanks!
            Will be released in v. 2.1 in a week time.

            warden Radek Antoniuk added a comment - This should be merged from PR50, thanks! Will be released in v. 2.1 in a week time.

            People

              warden Radek Antoniuk
              paul_muller Paul Muller
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: