[JIRA] [pagerduty-plugin] (JENKINS-34922) NullPointerException Creating and Resolving Issues

5 views
Skip to first unread message

jacobstr@gmail.com (JIRA)

unread,
May 18, 2016, 12:53:02 PM5/18/16
to jenkinsc...@googlegroups.com
Jacob Straszynski created an issue
 
Jenkins / Bug JENKINS-34922
NullPointerException Creating and Resolving Issues
Issue Type: Bug Bug
Assignee: Alexander Leibzon
Components: pagerduty-plugin
Created: 2016/May/18 4:52 PM
Labels: plugin
Priority: Major Major
Reporter: Jacob Straszynski

When resolving an incident:

Resolving incident
ERROR: Build step failed with exception
java.lang.NullPointerException
	at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.resolveIncident(PagerDutyTrigger.java:225)
	at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:213)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
	at hudson.model.Build$BuildExecution.post2(Build.java:185)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
	at hudson.model.Run.execute(Run.java:1766)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:408)
Build step 'PagerDuty Incident Trigger' marked build as failure
Finished: FAILURE

When attempting to create one:

ERROR: Tried to trigger PD with apiKey = [***]
java.lang.NullPointerException
	at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.triggerPagerDuty(PagerDutyTrigger.java:266)
	at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:210)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
	at hudson.model.Build$BuildExecution.post2(Build.java:185)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
	at hudson.model.Run.execute(Run.java:1766)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:408)
Build step 'PagerDuty Incident Trigger' marked build as failure
Finished: FAILURE

I thought maybe the issue was that the incidentKey didn't exist in PagerDuty? I assumed you could create an ad-hoc key and it would map to a consistent incident (otherwise I'm not sure how a subsequent resolveIncident would correlate an incident triggered from a previous trigger to a new one).

The contextual help bubble says: PagerDuty incident id if available (otherwise it will create one).

If I leave the incidentKey field blank:

java.lang.IllegalArgumentException: 'incidentKey' must not be blank. Was: ''
	at com.squareup.pagerduty.incidents.Util.checkArgument(Util.java:39)
	at com.squareup.pagerduty.incidents.Util.checkStringArgument(Util.java:26)
	at com.squareup.pagerduty.incidents.Resolution$Builder.<init>(Resolution.java:44)
	at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.resolveIncident(PagerDutyTrigger.java:220)
	at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:213)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
	at hudson.model.Build$BuildExecution.post2(Build.java:185)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
	at hudson.model.Run.execute(Run.java:1766)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:408)
Build step 'PagerDuty Incident Trigger' marked build as failure
Finished: FAILURE

Set to major in the context of this plugin. Certainly not a major loss to JIRA overall! We're trying to use the plugin to drive periodic acceptance tests - when a sequence of API interactions fails, the build fails, we get an alert. We want this to run every 5 minutes. If a subsequent run succeeds the incident should be resolved automatically.

Jenkins Version: 1.6.3
Pagerduty Plugin Version: 0.2.4

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

jacobstr@gmail.com (JIRA)

unread,
May 18, 2016, 6:47:01 PM5/18/16
to jenkinsc...@googlegroups.com
Jacob Straszynski updated an issue
Change By: Jacob Straszynski
When resolving an incident:

{code}

Resolving incident
ERROR: Build step failed with exception
java.lang.NullPointerException
at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.resolveIncident(PagerDutyTrigger.java:225)
at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:213)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Build step 'PagerDuty Incident Trigger' marked build as failure
Finished: FAILURE
{code}


When attempting to create one:

{code}

ERROR: Tried to trigger PD with apiKey = [***]
java.lang.NullPointerException
at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.triggerPagerDuty(PagerDutyTrigger.java:266)
at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:210)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Build step 'PagerDuty Incident Trigger' marked build as failure
Finished: FAILURE
{code}


I thought maybe the issue was that the incidentKey didn't exist in PagerDuty? I assumed you could create an ad-hoc key and it would map to a consistent incident (otherwise I'm not sure how a subsequent resolveIncident would correlate an incident triggered from a previous trigger to a new one). 

The contextual help bubble says: *PagerDuty incident id if available (otherwise it will create one).*


If I leave the incidentKey field blank:

{code}

java.lang.IllegalArgumentException: 'incidentKey' must not be blank. Was: ''
at com.squareup.pagerduty.incidents.Util.checkArgument(Util.java:39)
at com.squareup.pagerduty.incidents.Util.checkStringArgument(Util.java:26)
at com.squareup.pagerduty.incidents.Resolution$Builder.<init>(Resolution.java:44)
at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.resolveIncident(PagerDutyTrigger.java:220)
at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:213)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Build step 'PagerDuty Incident Trigger' marked build as failure
Finished: FAILURE
{code}

Set to major in the context of this plugin. Certainly not a major loss to
 JIRA  Jenkins  overall! We're trying to use the plugin to drive periodic acceptance tests - when a sequence of API interactions fails, the build fails, we get an alert. We want this to run every 5 minutes. If a subsequent run succeeds the incident should be resolved automatically.


Jenkins Version: 1.6.3
Pagerduty Plugin Version: 0.2.4

brendan.arthurs@ie.ibm.com (JIRA)

unread,
Nov 29, 2016, 9:47:02 AM11/29/16
to jenkinsc...@googlegroups.com
Brendan Arthurs commented on Bug JENKINS-34922
 
Re: NullPointerException Creating and Resolving Issues

I've opened a pull request to resolve this issue - https://github.com/jenkinsci/pagerduty-plugin/pull/2 Waiting on a committer to review / merge

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

scm_issue_link@java.net (JIRA)

unread,
Nov 29, 2016, 5:30:02 PM11/29/16
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: Alexander Leibzon
Path:
src/main/java/org/jenkinsci/plugins/pagerduty/PagerDutyTrigger.java
http://jenkins-ci.org/commit/pagerduty-plugin/62077523494fcc523e101ad2c6950d46d559abbb
Log:
Merge pull request #2 from brenarth/JENKINS-34922

Check for null result when resolving incidents

Compare: https://github.com/jenkinsci/pagerduty-plugin/compare/c795510e1658...62077523494f

alexander@leibzon.com (JIRA)

unread,
Feb 10, 2017, 4:59:04 PM2/10/17
to jenkinsc...@googlegroups.com
Alexander Leibzon started work on Bug JENKINS-34922
 
Change By: Alexander Leibzon
Status: Open In Progress

alexander@leibzon.com (JIRA)

unread,
Feb 10, 2017, 4:59:04 PM2/10/17
to jenkinsc...@googlegroups.com
Alexander Leibzon updated Bug JENKINS-34922
 

Fixed in v0.2.5

Change By: Alexander Leibzon
Status: In Review Resolved
Resolution: Fixed

alexander@leibzon.com (JIRA)

unread,
Feb 10, 2017, 4:59:05 PM2/10/17
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages