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

JIRA Update relevant issues failing

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • ghprb-plugin, jira-plugin
    • None
    • Jenkins - 2.87
      JIRA plugin - 2.5
      ghprb-plugin 1.39.0

    Description

      I am using the github pull request builder plugin to trigger a build.

      "Default Selector" for the "JIRA: Update relevant issues" post-build task does not work.

      Based on some environment variables that I see, the issue id is available as $ghprbSourceBranch, among others. It would be nice if Default Selector worked with ghprb.

      I'm trying to either get the default selector to know what issues to update based on the pull request builder, or get the JQL selector to work with environment variables the job knows about.

      for example, JQL is:
      id in ("$JIRA_ID")

      I have verified that other post-build steps are recognizing an environment variable for JIRA_ID, however the JQL selector is breaking with the following in the system log:

      jira rest client get issue from jql search error. cause: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={}, errorMessages=[The issue key '$JIRA_ID' for field 'id' is invalid.]}]} RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={}, errorMessages=[The issue key '$JIRA_ID' for field 'id' is invalid.]}]} 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) at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:67) at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:11) at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:268) at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:158) at com.google.common.util.concurrent.Futures$6.run(Futures.java:975) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53) at com.atlassian.util.concurrent.Promises$Of$3.apply(Promises.java:268) at com.atlassian.util.concurrent.Promises$2.onSuccess(Promises.java:158) at com.google.common.util.concurrent.Futures$6.run(Futures.java:975) at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:253) at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:149) at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134) at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:170) at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53) at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:46) at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:197) at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:90) at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(SettableFuturePromiseHttpPromiseAsyncClient.java:192) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused: java.util.concurrent.ExecutionException at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:289) at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:262) at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:91) at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:69) at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.get(DelegatingPromise.java:107) at hudson.plugins.jira.JiraRestService.getIssuesFromJqlSearch(JiraRestService.java:177) at hudson.plugins.jira.JiraSession.getIssuesFromJqlSearch(JiraSession.java:135) at hudson.plugins.jira.selector.JqlIssueSelector.findIssueIds(JqlIssueSelector.java:49) at hudson.plugins.jira.Updater.perform(Updater.java:85) at hudson.plugins.jira.JiraIssueUpdater.perform(JiraIssueUpdater.java:64) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635) at hudson.model.Run.execute(Run.java:1749) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:421)

      Attachments

        Issue Links

          Activity

            ben_c Benjamin Coover added a comment - - edited

            I am seeing this as well in versions 2.5.1 and 3.0.0 of the jira-plugin. Rolling back to version 2.4.2 restores expected behavior for "JIRA: Update Relevant Issues" using "Default Selector"

            UPDATE: As of today (2018/06/20), this issue is blocking the use of Blue Ocean version 1.6.0 due to the JIRA Integration for Blue Ocean 1.6.0 plugin requiring JIRA plugin 3.0.0+

            ben_c Benjamin Coover added a comment - - edited I am seeing this as well in versions 2.5.1 and 3.0.0 of the jira-plugin. Rolling back to version 2.4.2 restores expected behavior for "JIRA: Update Relevant Issues" using "Default Selector" UPDATE : As of today (2018/06/20), this issue is blocking the use of Blue Ocean version 1.6.0 due to the JIRA Integration for Blue Ocean 1.6.0 plugin requiring JIRA plugin 3.0.0+

            Do you still see this happening with version 3.1.1?

            warden Radek Antoniuk added a comment - Do you still see this happening with version 3.1.1?
            bpatterson ben patterson added a comment -

            Hi - I no longer maintain this plugin; assigning ticket to sam, who is the current maintainer according to the wiki.

            bpatterson ben patterson added a comment - Hi - I no longer maintain this plugin; assigning ticket to sam, who is the current maintainer according to the wiki .

            Closed as an old issue without response, hopefully fixed.

            warden Radek Antoniuk added a comment - Closed as an old issue without response, hopefully fixed.

            People

              sag47 Sam Gleske
              jjwink19 Josh W
              Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: