explain-error-plugin icon indicating copy to clipboard operation
explain-error-plugin copied to clipboard

Integration with single pipeline steps and/or pipeline graph view

Open mawinter69 opened this issue 1 year ago • 5 comments

Problem

What problem does this solve? When a pipeline executes steps in parallel, the output in the regular protocol used by the plugin contains all the output of the parallel stages nested together. This can potentially make it hard for the AI to find the root cause or lead to wrong results.

Solution

Describe your proposed solution: The plugin could walk over the flownodes of the pipeline and check which ones have failed and obtain only the log of that step. In a parallel execution without failfast it might mean that more than step failed and there is not a single reason, so potentially several calls must be done. The plugin could also inject into the console log of a step (e.g. a sh step that failed, pipeline/212/execution/node/12/log/)

Alternatives

What alternative approaches have you considered?

Additional Context

Ideally the plugin is also able to inject itself into the pipeline graph view plugin so that when lookin there are a failing step one could click a button there to analyze an error.

mawinter69 avatar Nov 16 '25 00:11 mawinter69

@mawinter69 somenthing like https://github.com/panicking/explain-error-plugin/commit/cf7c93532ebdaa80331b661c0e2c0a666ae40ad3

I did not test now, I need to add some logs

panicking avatar Dec 16 '25 09:12 panicking

@mawinter69 @jenkinsci/explain-error-plugin-developers I think that part of this is implemented now

https://github.com/jenkinsci/explain-error-plugin/pull/66

panicking avatar Dec 20 '25 12:12 panicking

@mawinter69 This is for now what I have

https://github.com/jenkinsci/explain-error-plugin/pull/69

panicking avatar Dec 21 '25 17:12 panicking

@shenxianpeng I will worki on it this weekend ;)

panicking avatar Feb 06 '26 22:02 panicking

Most of this is done, so I'm closing it.

Failed Pipelines are now explained from the logs of the steps that failed, parallel failures included, instead of the whole console output. And the Stages page of Pipeline Graph View has an Explain Error button for the stage or branch you select (#191, coming in the next release).

The one thing not done is a button on a single step's log page. If that is still wanted, please open a new issue for it.

shenxianpeng avatar Oct 13 '26 21:10 shenxianpeng