Skip to content

Commit f1a4631

Browse files
committed
fix: use module-specific watchdog type, filter drush meta from error check
1 parent 6e677df commit f1a4631

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

.github/scripts/solr9-cuj8-validate-search.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,25 @@ fi
7474
# Step 3: Check watchdog for Solr errors
7575
echo "--- Step 3: Check watchdog for Solr errors ---"
7676

77-
ERRORS=$(terminus drush "$SITE_ENV" -- watchdog-show "--type=Apache Solr" --count=10 2>&1) || true
77+
if [ "$MODULE" = "apachesolr" ]; then
78+
WD_TYPE="Apache Solr"
79+
else
80+
WD_TYPE="search_api_solr"
81+
fi
82+
83+
ERRORS=$(terminus drush "$SITE_ENV" -- watchdog-show "--type=$WD_TYPE" --count=10 2>&1) || true
7884

7985
if echo "$ERRORS" | grep -qiE "Unrecognized message type\|No log messages"; then
80-
echo "No Solr log entries in watchdog."
81-
elif echo "$ERRORS" | grep -qi "error"; then
82-
echo "::warning::Solr entries found in watchdog:"
83-
echo "$ERRORS"
86+
echo "No Solr log entries in watchdog (type '$WD_TYPE' not present)."
8487
else
85-
echo "No Solr errors in watchdog."
88+
# Filter out drush meta lines, check for actual error entries
89+
REAL_ERRORS=$(echo "$ERRORS" | grep -i "error" | grep -vi "Unrecognized message type\|Exit:\|Command:" || true)
90+
if [ -n "$REAL_ERRORS" ]; then
91+
echo "::warning::Solr errors found in watchdog:"
92+
echo "$REAL_ERRORS"
93+
else
94+
echo "No Solr errors in watchdog."
95+
fi
8696
fi
8797

8898
# Step 4: Verify Solr ping is healthy

0 commit comments

Comments
 (0)