Skip to content

Commit d667b63

Browse files
committed
fix: Only show error and fatal level in snazy
Modified the `snazy` command in the CI script to include the `-f error` and `-f fatal` flags. This ensures that only error and fatal messages instead of showing all log levels are displayed, and mising critical Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
1 parent 740ff2d commit d667b63

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ jobs:
432432
run: |
433433
./hack/gh-workflow-ci.sh collect_logs
434434
435-
- name: Show controllers/watcher logs with Snazy
435+
- name: Show controllers/watcher errors with Snazy
436436
if: ${{ always() }}
437437
run: |
438438
./hack/gh-workflow-ci.sh output_logs

hack/gh-workflow-ci.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ run_e2e_tests() {
147147

148148
output_logs() {
149149
if command -v "snazy" >/dev/null 2>&1; then
150-
snazy --extra-fields --skip-line-regexp="^(Reconcile (succeeded|error)|Updating webhook)" /tmp/logs/pac-pods.log
150+
snazy --extra-fields --skip-line-regexp="^(Reconcile (succeeded|error)|Updating webhook)" -f error -f fatal /tmp/logs/pac-pods.log
151151
else
152152
# snazy for the poors
153153
python -c "import sys,json,datetime; [print(f'• { (lambda t: datetime.datetime.fromisoformat(t.rstrip(\"Z\")).strftime(\"%H:%M:%S\") if isinstance(t,str) else datetime.datetime.fromtimestamp(t).strftime(\"%H:%M:%S\"))(json.loads(l.strip())[\"ts\"] )} {json.loads(l.strip()).get(\"msg\",\"\")}') if l.strip().startswith('{') else print(l.strip()) for l in sys.stdin]" \
@@ -271,7 +271,7 @@ notify_slack() {
271271
# Use literal \n for Slack mrkdwn newlines (will be kept as-is in JSON)
272272
failure_details="${failure_details}• *${provider}*: ${failed_tests}\\n"
273273
fi
274-
done <<< "${provider_dirs}"
274+
done <<<"${provider_dirs}"
275275

276276
# Remove trailing comma and space
277277
failed_providers="${failed_providers%, }"

0 commit comments

Comments
 (0)