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

Huge JIRA comments generated by "Update relevant issues" are silently rejected.

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      A big merge or a change involving lots of files easily produces a huge comment, especially when "Record Scm changes" is turned on. 
      Jira typically has a limit on the comment size, and when Jenkins attempts to put in such a huge comment, the updater fails as below:

      2021-04-23 10:43:26.704+0000 [id=21943]	WARNING	h.plugins.jira.JiraRestService#addComment: Jira REST client add comment error. cause: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={comment=The entered text is too long. It exceeds the allowed limit of 32767 characters.}, errorMessages=[]}]}
      RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={comment=The entered text is too long. It exceeds the allowed limit of 32767 characters.}, errorMessages=[]}]}
      	at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:176)
      	at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:170)
      

      These JIRA update failures are not reflected in the job console log (it only puts out several [Jira] Updating issue KEY-1234 ), so there's no way to tell what went wrong unless you look up the actual Jenkins log.

      EXPECTED:
      1. report JIRA update failures in the job console log
      2. add a parameter ("max. comment length" or whatever) in the global configuration for the Jira plugin. Truncate generated comments according to this limit (possibly, attempting to close any fancy formatting tags at the end, but that's not critical).

      It's also quite possible that one may need to see the SCM details fetched by "record SCM changes" in Jenkins' web UI, but omit them in the JIRA comments. I do not see how to achieve this having only a single checkbox in the Configuration.

        Attachments

          Activity

          vicd Victor Dulepov created issue -
          vicd Victor Dulepov made changes -
          Field Original Value New Value
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          vicd Victor Dulepov made changes -
          Description A big merge or a change involving lots of files easily produces a huge comment, especially when "Record Scm changes" is turned on. 
          Jira typically has a limit on the comment size, and when Jenkins attempts to put in such a huge comment, the updater fails as below:
          {code}
          2021-04-23 10:43:26.704+0000 [id=21943] WARNING h.plugins.jira.JiraRestService#addComment: Jira REST client add comment error. cause: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={comment=The entered text is too long. It exceeds the allowed limit of 32767 characters.}, errorMessages=[]}]}
          RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={comment=The entered text is too long. It exceeds the allowed limit of 32767 characters.}, errorMessages=[]}]}
          at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:176)
          at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:170)
          {code}

          These JIRA update failures are not reflected in the job console log (it only puts out several {{[Jira] Updating issue KEY-1234}} ), so there's no way to tell what went wrong unless you look up the actual Jenkins log.

          EXPECTED:
          1. report JIRA update failures in the job console log
          2. add a parameter ("max. comment length" or whatever) in the global configuration for the Jira plugin. Truncate generated comments according to this limit (possibly, attempting to close any fancy formatting tags at the end, but that's not critical).
          A big merge or a change involving lots of files easily produces a huge comment, especially when "Record Scm changes" is turned on. 
          Jira typically has a limit on the comment size, and when Jenkins attempts to put in such a huge comment, the updater fails as below:
          {code}
          2021-04-23 10:43:26.704+0000 [id=21943] WARNING h.plugins.jira.JiraRestService#addComment: Jira REST client add comment error. cause: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={comment=The entered text is too long. It exceeds the allowed limit of 32767 characters.}, errorMessages=[]}]}
          RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={comment=The entered text is too long. It exceeds the allowed limit of 32767 characters.}, errorMessages=[]}]}
          at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:176)
          at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:170)
          {code}

          These JIRA update failures are not reflected in the job console log (it only puts out several {{[Jira] Updating issue KEY-1234}} ), so there's no way to tell what went wrong unless you look up the actual Jenkins log.

          EXPECTED:
          1. report JIRA update failures in the job console log
          2. add a parameter ("max. comment length" or whatever) in the global configuration for the Jira plugin. Truncate generated comments according to this limit (possibly, attempting to close any fancy formatting tags at the end, but that's not critical).

          It's also quite possible that one may need to see the SCM details fetched by "record SCM changes" in Jenkins' web UI, but omit them in the JIRA comments. I do not see how to achieve this having only a single checkbox in the Configuration.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            vicd Victor Dulepov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: