-
-
Notifications
You must be signed in to change notification settings - Fork 57
In some cases previous test result per stage can't be resolved, adding more diagnostics #311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In some cases previous test result per stage can't be resolved, adding more diagnostics #311
Conversation
…g more diagnostics
| Run<?,?> run = tr.getRun(); | ||
| if (stageName != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Run<?,?> run = tr.getRun(); | |
| if (stageName != null) { | |
| if (stageName != null) { | |
| Run<?,?> run = tr.getRun(); |
| FlowNode stageId = new DepthFirstScanner().findFirstMatch(execution, new StageNamePredicate(stageName)); | ||
| if (stageId != null) { | ||
| listener.getLogger().println("Found stage \"" + stageName + "\" in " + run.getFullDisplayName()); | ||
| tr = ((hudson.tasks.junit.TestResult) tr).getResultForPipelineBlock(stageId.getId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this cast need to be checked?
| if (prevRun instanceof FlowExecutionOwner.Executable) { | ||
| FlowExecutionOwner owner = ((FlowExecutionOwner.Executable) prevRun).asFlowExecutionOwner(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(reminder to do #310)
| if (targetBranch instanceof Job) { | ||
| result = getTestResult(project, ((Job<?, ?>) targetBranch).getLastBuild(), listener); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
I have observed in some cases that despite a valid stage name is specified, I don't get the corresponding logs being displayed (
Found stage ...,No stage ...), indicating that there may be an issue during the resolution ofFlowExecution.For now, adding more diagnostics so that on next occurrence I can pinpoint the issue better.
Testing done
Submitter checklist