From 9950df2ae7ff8a49008d7cbbeb0344efe9072354 Mon Sep 17 00:00:00 2001 From: andrew clark Date: Fri, 31 Oct 2025 08:38:31 -0600 Subject: [PATCH] Adding new alert failure patterns (#3122) * Adding GPU not found pattern Also, failurePatterns does not need to be global. Moved variable to live in the failure notifications function scope. * Testing new failure type * Testing failure * Removing the forced failure test * Adding an additional failure pattern [ROCm/composable_kernel commit: 1977e4b96a393ca35679c6f31ddb206c0e2a5c43] --- Jenkinsfile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index af3e211aef..ce88294567 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,14 +12,6 @@ def show_node_info() { """ } -// Error patterns to scan build logs for specific failure types and send detailed notifications. -def failurePatterns = [ - [pattern: /login attempt to .* failed with status: 401 Unauthorized/, description: "Docker registry authentication failed"], - [pattern: /docker login failed/, description: "Docker login failed"], - [pattern: /HTTP request sent .* 404 Not Found/, description: "HTTP request failed with 404"], - [pattern: /cat: .* No such file or directory/, description: "GPU not found"], -] - // Given a pattern, check if the log contains the pattern and return the context. def checkForPattern(pattern, log) { def lines = log.split('\n') @@ -42,8 +34,18 @@ def checkForPattern(pattern, log) { return [found: false, matchedLine: "", context: ""] } -// Scan build logs and send notifications +// Scan the build logs for failures and send notifications. def sendFailureNotifications() { + // Error patterns to scan build logs for specific failure types and send detailed notifications. + def failurePatterns = [ + [pattern: /login attempt to .* failed with status: 401 Unauthorized/, description: "Docker registry authentication failed"], + [pattern: /docker login failed/, description: "Docker login failed"], + [pattern: /HTTP request sent .* 404 Not Found/, description: "HTTP request failed with 404"], + [pattern: /cat: .* No such file or directory/, description: "GPU not found"], + [pattern: /GPU not found/, description: "GPU not found"], + [pattern: /Could not connect to Redis at .* Connection timed out/, description: "Redis connection timed out"] + ] + // Get the build log. def buildLog = sh(script: 'wget -q --no-check-certificate -O - ' + BUILD_URL + 'consoleText', returnStdout: true) // Check for patterns in the log.