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

Exception on non-existing field values in JIRA field matcher breaks all triggered jobs

    Details

    • Similar Issues:

      Description

      Situation: there are two jobs, which have JIRA triggering configured.

      job1
      JQL filter: project=PROJECT1
      Changelog matcher:
          JIRA field ID: status
          Compare new value: Ready for TEST deploy
      
      job2
      JQL filter: project=PROJECT2
      Changelog matcher:
          JIRA field ID: status
          Compare new value: Ready for testing
      

      Also, in Jira, PROJECT1 does not have Ready for testing value for status field.

      Issue: when there is an event in PROJECT1, which would match the specified Changelog matcher in job1, build is not triggered, because job2 trigger processing fails (even if it does not match JQL filter). Error thrown:

      WARNING: Error while serving https://jenkins.server.host/jira-trigger-webhook-receiver/
      java.lang.reflect.InvocationTargetException
              at sun.reflect.GeneratedMethodAccessor692.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:335)
              at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:52)
              at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
              at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:175)
              at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:108)
              at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:26)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
              at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:362)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
              at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
              at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
              at hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter$1.call(ScmSyncConfigurationFilter.java:46)
              at hudson.plugins.scm_sync_configuration.ScmSyncConfigurationDataProvider.provideRequestDuring(ScmSyncConfigurationDataProvider.java:103)
              at hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationFilter.doFilter(ScmSyncConfigurationFilter.java:42)
              at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
              at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
              at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
              at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
              at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
              at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
              at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
       at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
              at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
              at org.eclipse.jetty.server.Server.handle(Server.java:499)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
              at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
              at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.util.concurrent.ExecutionException: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={}, errorMessages=[The value 'Ready for testing' does not exist for the field 'status'.]}]}
              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 java_util_concurrent_Future$get.call(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
              at com.ceilfors.jenkins.plugins.jiratrigger.jira.JrjcJiraClient.validateIssueKey(JrjcJiraClient.groovy:57)
              at com.ceilfors.jenkins.plugins.jiratrigger.jira.JiraClient$validateIssueKey.call(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
              at com.ceilfors.jenkins.plugins.jiratrigger.JiraTrigger.run(JiraTrigger.groovy:46)
              at com.ceilfors.jenkins.plugins.jiratrigger.JiraTrigger$run.call(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
              at com.ceilfors.jenkins.plugins.jiratrigger.JiraTriggerExecutor.scheduleBuildsInternal(JiraTriggerExecutor.groovy:80)
              at com.ceilfors.jenkins.plugins.jiratrigger.JiraTriggerExecutor.this$2$scheduleBuildsInternal(JiraTriggerExecutor.groovy)
              at sun.reflect.GeneratedMethodAccessor698.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
              at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
              at com.ceilfors.jenkins.plugins.jiratrigger.JiraTriggerExecutor.scheduleBuilds(JiraTriggerExecutor.groovy:69)
              at com.ceilfors.jenkins.plugins.jiratrigger.JiraTriggerExecutor$scheduleBuilds.callCurrent(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
              at com.ceilfors.jenkins.plugins.jiratrigger.JiraTriggerExecutor.changelogCreated(JiraTriggerExecutor.groovy:52)
              at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhookListener$changelogCreated.call(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
              at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook.processEvent(JiraWebhook.groovy:67)
              at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook$processEvent.callCurrent(Unknown Source)
              at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
              at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
              at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook.doIndex(JiraWebhook.groovy:53)
              ... 73 more
      Caused by: RestClientException{statusCode=Optional.of(400), errorCollections=[ErrorCollection{status=400, errors={}, errorMessages=[The value 'Ready for testing' does not exist for the field 'status'.]}]}
              at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:173)
              at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:167)
              at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:48)
              at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:12)
              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)
              ... 3 more
      
      

        Attachments

          Activity

          Hide
          ceilfors Wisen Tanasa added a comment -

          I don't think the error is going to happen if your JQL filter is just project=PROJECT2 or project=PROJECT1 as the error is actually thrown by JIRA. Can you check if your JQL filter configured in either of those Jenkins jobs to not contain status="Ready for testing"? That might be the cause of the problem.

          Show
          ceilfors Wisen Tanasa added a comment - I don't think the error is going to happen if your JQL filter is just project=PROJECT2  or project=PROJECT1 as the error is actually thrown by JIRA. Can you check if your JQL filter configured in either of those Jenkins jobs to not contain status="Ready for testing" ? That might be the cause of the problem.
          Hide
          ceilfors Wisen Tanasa added a comment -

          Closed due to inactivity.

          Show
          ceilfors Wisen Tanasa added a comment - Closed due to inactivity.

            People

            • Assignee:
              ceilfors Wisen Tanasa
              Reporter:
              laumingis Laumingis Skripkauskas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: