Add line number extraction capability for error explanation#59
Add line number extraction capability for error explanation#59Nikitaa104 wants to merge 2 commits intojenkinsci:mainfrom
Conversation
panicking
left a comment
There was a problem hiding this comment.
Was nice to be somehow link to the text. @mawinter69 any idea of possible?
mawinter69
left a comment
There was a problem hiding this comment.
I wonder it's not easier to just tell the AI to include information about the line numbers which it considers as the cause of the problem. Though one has to consider that the plugin isn't passing the complete log to the AI. By default it is I think the last 100 lines
src/main/java/io/jenkins/plugins/explain_error/ErrorExplainer.java
Outdated
Show resolved
Hide resolved
|
To me the requirement is not totally clear. |
The idea is when you have a build explaination result is to be able to link from the explanation to the jenkins log. So understand where the failure reason is in the log console. Now what I said in the jenkins community is that I did not find an easy way to link <href or somenthing like that to go there. This allow not only to have an explanation by AI but confirm go down direct to the point where was analyzed. Is that more clear? |
|
|
Afaik you can't directly link to line numbers in Jenkins. There is https://plugins.jenkins.io/linenumbers/ that provides this. |
821aee4 to
934da48
Compare
934da48 to
46a4f10
Compare
|
Hi @panicking and @mawinter69, I've rebased this PR on the latest upstream/main to include recent changes. ✅ Successfully merged with upstream The PR is ready for final review. Please let me know if any additional changes are needed. Thank you! |
|
Would be interesting to see what the AI does with the line numbers. Is it using them in any way? Does it create any mentions that the error is in a specific line? |
For this reason, and since PR #69 already addresses this by linking directly to the failed log section, I think this PR can be closed. Any thoughts? |
Summary
This PR introduces approximate line-number detection in the Explain Error plugin.
It enhances the extracted error logs by prefixing each matched line with its corresponding line number.
Why?
This aligns with the first improvement idea suggested by @trimarchimichael:
"Investigate if it is possible to add the line numbers, approx where the build fails in the explanation."
What’s Added?
Checklist