This is an automated email from the ASF dual-hosted git repository.

tcunning pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 3025df829ceda6a6c7e03cb79f874abae97a5f87
Author: Tom Cunningham <[email protected]>
AuthorDate: Tue Apr 14 12:53:11 2026 -0400

    Add more debugging to parse_errors
---
 .github/actions/incremental-build/parse_errors.sh | 82 +++++++++++++++++++----
 1 file changed, 68 insertions(+), 14 deletions(-)

diff --git a/.github/actions/incremental-build/parse_errors.sh 
b/.github/actions/incremental-build/parse_errors.sh
index 9f01540debc..24e904fd078 100755
--- a/.github/actions/incremental-build/parse_errors.sh
+++ b/.github/actions/incremental-build/parse_errors.sh
@@ -21,43 +21,82 @@ set +e
 
 LOG_FILE=$1
 
+echo "[DEBUG parse_errors.sh] Processing: $LOG_FILE" >&2
+
 # Extract module path from log file path
 # e.g., 
./components-starter/camel-slack-starter/target/surefire-reports/foo.txt -> 
components-starter/camel-slack-starter
 MODULE_PATH=$(echo "$LOG_FILE" | sed 's|^\./||' | sed 's|/target/.*||')
+echo "[DEBUG parse_errors.sh] Module path: $MODULE_PATH" >&2
 
 # Skip if file doesn't exist or is not readable
-if [[ ! -f "$LOG_FILE" ]] || [[ ! -r "$LOG_FILE" ]]; then
+if [[ ! -f "$LOG_FILE" ]]; then
+  echo "[DEBUG parse_errors.sh] File does not exist: $LOG_FILE" >&2
   exit 0
 fi
 
+if [[ ! -r "$LOG_FILE" ]]; then
+  echo "[DEBUG parse_errors.sh] File is not readable: $LOG_FILE" >&2
+  exit 0
+fi
+
+echo "[DEBUG parse_errors.sh] File exists and is readable, size: $(wc -c < 
"$LOG_FILE") bytes" >&2
+
 # Extract failures/errors
+echo "[DEBUG parse_errors.sh] Searching for FAILURE|ERROR patterns..." >&2
 raw_failures=$(cat "$LOG_FILE" | egrep "FAILURE|ERROR" 2>/dev/null || true)
 if [[ -z "$raw_failures" ]]; then
+  echo "[DEBUG parse_errors.sh] No FAILURE or ERROR patterns found in file" >&2
   exit 0
 fi
 
+echo "[DEBUG parse_errors.sh] Found FAILURE/ERROR entries (count: $(echo 
"$raw_failures" | wc -l))" >&2
+echo "[DEBUG parse_errors.sh] First few lines of raw_failures:" >&2
+echo "$raw_failures" | head -5 >&2
+
 # Look for "Time elapsed" entries and extract org.* test names
+echo "[DEBUG parse_errors.sh] Searching for 'Time elapsed' entries..." >&2
 time_elapsed_entries=$(echo "$raw_failures" | grep "Time elapsed" 2>/dev/null 
|| true)
+echo "[DEBUG parse_errors.sh] Time elapsed entries found: $(echo 
"$time_elapsed_entries" | wc -l)" >&2
+
+echo "[DEBUG parse_errors.sh] Searching for org.* entries..." >&2
 org_entries=$(echo "$time_elapsed_entries" | egrep "^org" 2>/dev/null || true)
+echo "[DEBUG parse_errors.sh] org.* entries found: $(echo "$org_entries" | wc 
-l)" >&2
 
 if [[ -n "$org_entries" ]]; then
+  echo "[DEBUG parse_errors.sh] Processing org_entries:" >&2
+  echo "$org_entries" >&2
+
   # Generate summary with module path included in test name
   # Format: | Module::TestClass | Duration | Type |
+  echo "[DEBUG parse_errors.sh] Generating failed_summary..." >&2
   failed_summary=$(echo "$org_entries" | sed 's/\!//g' | awk -v 
mod="$MODULE_PATH" -F ' ' '{printf "| **%s**::%s | %s%s | %s |\n", mod, 
$1,$5,$6, $8}' 2>/dev/null || true)
+  echo "[DEBUG parse_errors.sh] failed_summary generated (length: 
${#failed_summary})" >&2
 
-  if [[ -n "$failed_summary" ]] && [[ -n "${GITHUB_STEP_SUMMARY:-}" ]]; then
-    # Add to GitHub step summary
-    echo "$failed_summary" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
-
-    # Add detailed error output
-    echo "" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
-    echo "<details><summary>❌ Failure details for $MODULE_PATH</summary>" >> 
"$GITHUB_STEP_SUMMARY" 2>/dev/null || true
-    echo "" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
-    echo "\`\`\`" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
-    cat "$LOG_FILE" | egrep -A 10 "FAILURE|ERROR" | head -100 >> 
"$GITHUB_STEP_SUMMARY" 2>/dev/null || true
-    echo "\`\`\`" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
-    echo "</details>" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
-    echo "" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
+  if [[ -n "$failed_summary" ]]; then
+    echo "[DEBUG parse_errors.sh] failed_summary is not empty" >&2
+
+    if [[ -n "${GITHUB_STEP_SUMMARY:-}" ]]; then
+      echo "[DEBUG parse_errors.sh] GITHUB_STEP_SUMMARY is set to: 
$GITHUB_STEP_SUMMARY" >&2
+
+      # Add to GitHub step summary
+      echo "[DEBUG parse_errors.sh] Writing summary to GITHUB_STEP_SUMMARY..." 
>&2
+      echo "$failed_summary" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
+
+      # Add detailed error output
+      echo "" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
+      echo "<details><summary>❌ Failure details for $MODULE_PATH</summary>" >> 
"$GITHUB_STEP_SUMMARY" 2>/dev/null || true
+      echo "" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
+      echo "\`\`\`" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
+      cat "$LOG_FILE" | egrep -A 10 "FAILURE|ERROR" | head -100 >> 
"$GITHUB_STEP_SUMMARY" 2>/dev/null || true
+      echo "\`\`\`" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
+      echo "</details>" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
+      echo "" >> "$GITHUB_STEP_SUMMARY" 2>/dev/null || true
+      echo "[DEBUG parse_errors.sh] Summary written to GITHUB_STEP_SUMMARY" >&2
+    else
+      echo "[DEBUG parse_errors.sh] GITHUB_STEP_SUMMARY is not set, skipping 
summary output" >&2
+    fi
+  else
+    echo "[DEBUG parse_errors.sh] failed_summary is empty, skipping summary 
generation" >&2
   fi
 
   # Output to stderr for CI logs
@@ -71,6 +110,21 @@ if [[ -n "$org_entries" ]]; then
   cat "$LOG_FILE" | egrep -A 10 "FAILURE|ERROR" | head -50 >&2
   echo "=============================================" >&2
   echo "" >&2
+else
+  echo "[DEBUG parse_errors.sh] No org.* entries found, but raw_failures 
exist" >&2
+  echo "[DEBUG parse_errors.sh] Outputting raw_failures to help debug:" >&2
+  echo "" >&2
+  echo "=============================================" >&2
+  echo "FAILURE/ERROR in module: $MODULE_PATH (no org.* pattern match)" >&2
+  echo "=============================================" >&2
+  echo "Raw failures found:" >&2
+  echo "$raw_failures" | head -20 >&2
+  echo "" >&2
+  echo "Full log file content (first 100 lines):" >&2
+  head -100 "$LOG_FILE" >&2
+  echo "=============================================" >&2
+  echo "" >&2
 fi
 
+echo "[DEBUG parse_errors.sh] Finished processing $LOG_FILE" >&2
 exit 0

Reply via email to