[JIRA] (JENKINS-49601) Triggering downstream pipeline from a replayed one ends in a NullPointerException

12 views
Skip to first unread message

ljbdudek@gmail.com (JIRA)

unread,
Feb 16, 2018, 8:58:02 AM2/16/18
to jenkinsc...@googlegroups.com
Łukasz Dudek created an issue
 
Jenkins / Bug JENKINS-49601
Triggering downstream pipeline from a replayed one ends in a NullPointerException
Issue Type: Bug Bug
Assignee: Unassigned
Components: pipeline
Created: 2018-02-16 13:57
Environment: Jenkins 2.91
Pipeline 2.5
Pipeline: API 2.25
Priority: Minor Minor
Reporter: Łukasz Dudek

When a pipeline job is replayed and the replayed build triggers a downstream pipeline, the latter crashes with the following exception:

java.lang.NullPointerException
	at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.getOriginal(ReplayCause.java:66)
	at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.print(ReplayCause.java:74)
	at hudson.model.Cause$UpstreamCause.print(Cause.java:323)
	at hudson.model.Cause$UpstreamCause.print(Cause.java:299)
	at hudson.model.BuildListener.started(BuildListener.java:49)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:254)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:421)
Finished: FAILURE
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Feb 20, 2018, 3:47:03 PM2/20/18
to jenkinsc...@googlegroups.com
Andrew Bayer updated an issue
Change By: Andrew Bayer
Component/s: workflow-cps-plugin
Component/s: pipeline

goostleek@o2.pl (JIRA)

unread,
Jan 23, 2019, 7:52:50 AM1/23/19
to jenkinsc...@googlegroups.com
Marcin Kłopotek updated an issue
Change By: Marcin Kłopotek
Attachment: image-2019-01-23-13-51-41-500.png
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

goostleek@o2.pl (JIRA)

unread,
Jan 23, 2019, 7:52:59 AM1/23/19
to jenkinsc...@googlegroups.com

goostleek@o2.pl (JIRA)

unread,
Jan 23, 2019, 7:53:06 AM1/23/19
to jenkinsc...@googlegroups.com

goostleek@o2.pl (JIRA)

unread,
Jan 23, 2019, 7:53:09 AM1/23/19
to jenkinsc...@googlegroups.com

benjamin.aaron.march@gmail.com (JIRA)

unread,
Sep 18, 2019, 5:10:04 AM9/18/19
to jenkinsc...@googlegroups.com

I can confirm the same issue.

I noticed something else that is interesting, and probably has the same cause.

Iif you "Rebuild" the first Pipeline, (that is, using the Rebuild plugin), then the second will be triggered and run without issue.

However, if you "Rebuild" the second Pipeline... then you also get the NPE:

 Started by upstream project "pipelines/bitbucket-write/CI-pipeline" build number 417
originally caused by:
 java.lang.NullPointerException
	at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.getOriginal(ReplayCause.java:66)
	at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.print(ReplayCause.java:74)
	at hudson.model.Cause$UpstreamCause.print(Cause.java:322)
	at hudson.model.Cause$UpstreamCause.print(Cause.java:298)
	at hudson.model.BuildListener.started(BuildListener.java:49)
	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:279)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE

So my workaround is... if I want another run of:

the first -> "Rebuild"
the second -> "Replay"

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

benjamin.aaron.march@gmail.com (JIRA)

unread,
Sep 18, 2019, 5:10:05 AM9/18/19
to jenkinsc...@googlegroups.com
Ben March edited a comment on Bug JENKINS-49601
I can confirm the same issue.

I noticed something else that is interesting, and probably has the same cause.

Iif If you "Rebuild" the first Pipeline, (that is, using the Rebuild plugin), then the second will be triggered and run without issue.


However, if you "Rebuild" the second Pipeline... then you also get the NPE:
{noformat}

Started by upstream project "pipelines/bitbucket-write/CI-pipeline" build number 417
originally caused by:
java.lang.NullPointerException
at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.getOriginal(ReplayCause.java:66)
at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.print(ReplayCause.java:74)
at hudson.model.Cause$UpstreamCause.print(Cause.java:322)
at hudson.model.Cause$UpstreamCause.print(Cause.java:298)
at hudson.model.BuildListener.started(BuildListener.java:49)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:279)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE{noformat}

So my workaround is... if I want another run of:

the first -> "Rebuild"
the second -> "Replay"

benjamin.aaron.march@gmail.com (JIRA)

unread,
Sep 18, 2019, 7:50:02 AM9/18/19
to jenkinsc...@googlegroups.com
Ben March edited a comment on Bug JENKINS-49601
I can confirm not replicate the same exact issue .

I noticed something else that is interesting
described , and probably has but a slightly different workflow causes the same cause stacktrace .

Single branch pipeline calling -> Single branch pipeline

If you "Rebuild" the first second Pipeline , (that is, ... using the " Rebuild " plugin ) , then the second will be triggered and run without issue.

However, if
you "Rebuild" the second Pipeline... then you also get the NPE:

{noformat}
Started by upstream project "pipelines/bitbucket-write/CI-pipeline" build number 417
originally caused by:
java.lang.NullPointerException
at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.getOriginal(ReplayCause.java:66)
at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.print(ReplayCause.java:74)
at hudson.model.Cause$UpstreamCause.print(Cause.java:322)
at hudson.model.Cause$UpstreamCause.print(Cause.java:298)
at hudson.model.BuildListener.started(BuildListener.java:49)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:279)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE{noformat}
So my workaround is... if I want another run of:

the first ->
But " Rebuild Replay "
seems to work OK, for both the first and the second -> "Replay" .

benjamin.aaron.march@gmail.com (JIRA)

unread,
Sep 18, 2019, 7:52:02 AM9/18/19
to jenkinsc...@googlegroups.com
Ben March edited a comment on Bug JENKINS-49601
I can not replicate the exact issue described, but a slightly different workflow causes the same stacktrace.


Single branch pipeline calling -> Single branch pipeline

If you "Rebuild" the second Pipeline... using the "Rebuild" plugin, then you also get the NPE:

{noformat}
Started by upstream project "pipelines/bitbucket-write/CI-pipeline" build number 417
originally caused by:
java.lang.NullPointerException
at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.getOriginal(ReplayCause.java:66)
at org.jenkinsci.plugins.workflow.cps.replay.ReplayCause.print(ReplayCause.java:74)
at hudson.model.Cause$UpstreamCause.print(Cause.java:322)
at hudson.model.Cause$UpstreamCause.print(Cause.java:298)
at hudson.model.BuildListener.started(BuildListener.java:49)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:279)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE{noformat}

But "Replay" seems to work OK, for both the first and the second (using Pipeline 2 . 6)
Reply all
Reply to author
Forward
0 new messages