jenkinsci / jms-messaging-plugin

https://plugins.jenkins.io/jms-messaging
12 stars 37 forks source link

Need more explicit error message in case of non-existent provider #211

Open jsztuka opened 3 years ago

jsztuka commented 3 years ago

Hi, I've recently run into issue during JobDSL smoke tests. The error message was following:

com.redhat.cvp.jobdsl.JobScriptsSpec > test DSL script ci_operator_test_playbooks.groovy STANDARD_ERROR
      51.218 [id=17]    INFO    j.j.plugin.JenkinsJobManagement#createOrUpdateConfig: createOrUpdateConfig for test-operator-test-playbooks
      51.227 [id=17]    INFO    c.r.j.plugins.ci.CIBuildTrigger#stop: job is null! Not stopping trigger thread!
      51.229 [id=17]    SEVERE  c.r.j.plugins.ci.CIBuildTrigger#startTriggerThreads: Unhandled exception in trigger start.
    java.lang.NullPointerException
        at com.redhat.jenkins.plugins.ci.threads.CITriggerThread.<init>(CITriggerThread.java:53)
        at com.redhat.jenkins.plugins.ci.CIBuildTrigger.getComparisonThreads(CIBuildTrigger.java:367)
        at com.redhat.jenkins.plugins.ci.CIBuildTrigger.stopTriggerThreads(CIBuildTrigger.java:317)
        at com.redhat.jenkins.plugins.ci.CIBuildTrigger.startTriggerThreads(CIBuildTrigger.java:293)
        at com.redhat.jenkins.plugins.ci.CIBuildTrigger.start(CIBuildTrigger.java:253)
        at com.redhat.jenkins.plugins.ci.CIBuildTrigger.start(CIBuildTrigger.java:83)
        at org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty.startTriggers(PipelineTriggersJobProperty.java:113)
        at org.jenkinsci.plugins.workflow.job.WorkflowJob.addProperty(WorkflowJob.java:201)
        at org.jenkinsci.plugins.workflow.job.WorkflowJob.setTriggers(WorkflowJob.java:469)
        at org.jenkinsci.plugins.workflow.job.WorkflowJob.onLoad(WorkflowJob.java:145)
        at hudson.model.Items.load(Items.java:373)

I was using rabbitMQSubscriber in my job specification groovy file. This error ment that I was just referencing to provider which was absent in my jenkins global configuration. I propose changing this error msg to something more explicit so user realises he/she referred to a non-existent provider.

Thanks in advance.