-
Bug
-
Resolution: Duplicate
-
Trivial
-
None
Steps to reproduce
- Create a new multi-branch pipeline using https://github.com/i386/hellonode
- Go to the branches screen
- Trigger a new build for master
- Open the run and click stop
- Then click replay again
The goal here is to try starting, stopping then replaying really quickly.
You will get a 500 error back from the replay action
PUT http://localhost:8080/jenkins/blue/rest/organizations/jenkins/pipelines/hellonode/branches/master/runs/23/replay/ 500 (Server Error)
{
"message" : "Run was not added to queue.",
"code" : 500,
"errors" : [ ]
}
I attached a debugger when reproducing and got org.jenkinsci.plugins.workflow.cps.replay.ReplayAction#run2 returning null. Digging deeper it appears we can't get the flow owner
private @CheckForNull CpsFlowExecution getExecution() { FlowExecutionOwner owner = ((FlowExecutionOwner.Executable) run).asFlowExecutionOwner(); if (owner == null) { return null; } FlowExecution exec = owner.getOrNull(); return exec instanceof CpsFlowExecution ? (CpsFlowExecution) exec : null; }
I suspect this is a bug in workflow?
- duplicates
-
JENKINS-42997 Rerun button shows on UI even when the run cannot be rerun - enhance to have a replayable property
-
- Closed
-
jamesdumay It looks legit failure. In debugger I see its logging with FINE level "java.util.concurrent.ExecutionException: org.jenkinsci.plugins.github_branch_source.RateLimitExceededException: GitHub API rate limit exceeded" and eats away the exception. Perhaps it should be logged as error and maybe thrown as exception so that callers know what went wrong instead of getting null execution instance.