Class FailureClassifier

java.lang.Object
io.jenkins.plugins.smartexecutorloadbalancer.FailureClassifier

public final class FailureClassifier extends Object
Classifies a Throwable caught at executor-task level into a FailureType and extracts a one-line human-readable reason.

The classification is intentionally conservative: when uncertain whether a failure is a node problem or a code problem, we default to FailureType.CODE_FAULT so the node is not unfairly penalised.

  • Method Details

    • classify

      public static FailureType classify(Throwable t)
      Determine the failure type from the exception that terminated an executor slot.
      Parameters:
      t - the throwable; may be null (treated as FailureType.UNKNOWN)
    • extractReason

      public static String extractReason(Throwable t)
      Extract a concise one-line summary from the exception for storage. Never returns a stack trace — just the message chain.