Class GraphViewExplainErrorAction

java.lang.Object
io.jenkins.plugins.explain_error.GraphViewExplainErrorAction
All Implemented Interfaces:
Action, ModelObject, RunAction2

public class GraphViewExplainErrorAction extends Object implements 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 Details

    • GraphViewExplainErrorAction

      public GraphViewExplainErrorAction(Run<?,?> run)
  • Method Details

    • onAttached

      public void onAttached(Run<?,?> r)
      Specified by:
      onAttached in interface RunAction2
    • onLoad

      public void onLoad(Run<?,?> r)
      Specified by:
      onLoad in interface RunAction2
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • 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. Returns isFailed: true if the node (or any of its descendants) has an ErrorAction or a WarningAction with result Result.FAILURE. It also carries explanation, which says what the build has for that node: see getExplanationState(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 existing ErrorExplanationAction is already present (cache hit). Otherwise extracts logs from the specified node and calls the AI provider.
      Throws:
      IOException
    • getRun

      public Run<?,?> getRun()