Package io.jenkins.plugins.explain_error
Class GraphViewExplainErrorAction
java.lang.Object
io.jenkins.plugins.explain_error.GraphViewExplainErrorAction
- All Implemented Interfaces:
Action,ModelObject,RunAction2
Action for the Pipeline Graph View integration.
Provides AJAX endpoints to check node status and explain errors
for a specific selected node in the Pipeline Graph View.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoCheckBuildStatus(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) AJAX endpoint to check build status.voiddoCheckNodeStatus(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) AJAX endpoint to check whether a specific flow node is a failed node.voiddoExplainNodeError(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) AJAX endpoint to explain an error for a specific selected node.Run<?, ?> getRun()voidonAttached(Run<?, ?> r) void
-
Constructor Details
-
GraphViewExplainErrorAction
-
-
Method Details
-
onAttached
- Specified by:
onAttachedin interfaceRunAction2
-
onLoad
- Specified by:
onLoadin interfaceRunAction2
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
doCheckBuildStatus
public void doCheckBuildStatus(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) AJAX endpoint to check build status. Returns JSON with buildingStatus: 0 = SUCCESS, 1 = RUNNING, 2 = FINISHED and FAILURE. -
doCheckNodeStatus
public void doCheckNodeStatus(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) AJAX endpoint to check whether a specific flow node is a failed node. ReturnsisFailed: trueif the node (or any of its descendants) has anErrorActionor aWarningActionwith resultResult.FAILURE. It also carriesexplanation, which says what the build has for that node: seegetExplanationState(String). -
doExplainNodeError
public void doExplainNodeError(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException AJAX endpoint to explain an error for a specific selected node. First checks if an existingErrorExplanationActionis already present (cache hit). Otherwise extracts logs from the specified node and calls the AI provider.- Throws:
IOException
-
getRun
-