diag: inspect support ticket rows + endpoint
Diag / Diag · meezi-api support errors (push) Successful in 1s
Diag / Diag · meezi-api support errors (push) Successful in 1s
This commit is contained in:
@@ -10,11 +10,19 @@ jobs:
|
||||
env:
|
||||
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
|
||||
steps:
|
||||
- name: Grep api logs for support endpoint failures
|
||||
- name: Inspect support tickets data + endpoint
|
||||
run: |
|
||||
set -eu
|
||||
echo "=== support-related log lines with context (last 14 days) ==="
|
||||
docker logs meezi-api --since 336h 2>&1 | grep -i -A 30 "support/tickets" | tail -300 || true
|
||||
echo ""
|
||||
echo "=== exception blocks (last 14 days, tail 150) ==="
|
||||
docker logs meezi-api --since 336h 2>&1 | grep -i -B 2 -A 25 "exception" | tail -150 || true
|
||||
DBUSER=$(docker exec meezi-db env | grep '^POSTGRES_USER=' | cut -d= -f2)
|
||||
DBNAME=$(docker exec meezi-db env | grep '^POSTGRES_DB=' | cut -d= -f2)
|
||||
echo "db=$DBNAME user=$DBUSER"
|
||||
echo "=== ticket counts by status ==="
|
||||
docker exec meezi-db psql -U "$DBUSER" -d "$DBNAME" -c 'SELECT "Status", "Priority", count(*) FROM "SupportTickets" GROUP BY 1,2 ORDER BY 1;' || true
|
||||
echo "=== orphan / null checks ==="
|
||||
docker exec meezi-db psql -U "$DBUSER" -d "$DBNAME" -c 'SELECT count(*) AS null_cafe FROM "SupportTickets" WHERE "CafeId" IS NULL;' || true
|
||||
docker exec meezi-db psql -U "$DBUSER" -d "$DBNAME" -c 'SELECT t."Id", t."CafeId" FROM "SupportTickets" t LEFT JOIN "Cafes" c ON c."Id" = t."CafeId" WHERE c."Id" IS NULL LIMIT 5;' || true
|
||||
docker exec meezi-db psql -U "$DBUSER" -d "$DBNAME" -c 'SELECT t."Id", t."CreatedByEmployeeId" FROM "SupportTickets" t LEFT JOIN "Employees" e ON e."Id" = t."CreatedByEmployeeId" WHERE t."CreatedByEmployeeId" IS NOT NULL AND e."Id" IS NULL LIMIT 5;' || true
|
||||
echo "=== endpoint reachability (expect 401 JSON) ==="
|
||||
docker exec meezi-api sh -c 'wget -q -O- --header="Accept: application/json" http://localhost:8080/api/cafes/test/support/tickets 2>&1 | head -3; echo "exit=$?"' || true
|
||||
echo "=== recent api log: any 5xx ==="
|
||||
docker logs meezi-api 2>&1 | grep -E "HTTP[^ ]* [0-9]+ 5[0-9][0-9]|ERR|fail" | tail -30 || true
|
||||
|
||||
Reference in New Issue
Block a user