diagnostics: distinguish database write failures from guest internet failures

This commit is contained in:
jfeng committed 2026-10-22 16:41:24 +00:00
1 parent 64add2bc68
commit 67bbafdc41
2 files changed
+10 -21

No files matched your search

+3 -3
View File
@@ -8,14 +8,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read-only production diagnosis
- name: Production diagnosis and database write check
shell: bash
run: |
set -euo pipefail
docker inspect pix-hotspot --format 'IMAGE={{.Config.Image}} PORTS={{json .NetworkSettings.Ports}}'
docker exec -i pix-hotspot node --input-type=module < backend/diagnose-hotspot.mjs
- name: Recent access errors
- name: Recent sanitized errors
if: always()
shell: bash
run: |
docker logs --since 2h --tail 2000 pix-hotspot 2>&1 | node -e 'let s="";process.stdin.on("data",x=>s+=x);process.stdin.on("end",()=>console.log(s.split("\n").filter(l=>/\[ACESSO/.test(l)).slice(-40).map(l=>l.replace(/(?:[0-9a-f]{2}:){5}[0-9a-f]{2}/gi,"[MAC]").replace(/(?:\d{1,3}\.){3}\d{1,3}/g,"[IP]")).join("\n")));'
docker logs --since 2h --tail 3000 pix-hotspot 2>&1 | node -e 'let s="";process.stdin.on("data",x=>s+=x);process.stdin.on("end",()=>console.log(s.split("\n").filter(l=>/\[(ACESSO|CHECKOUT|LIMPEZA|HTTP)/.test(l)).slice(-60).map(l=>l.replace(/(?:[0-9a-f]{2}:){5}[0-9a-f]{2}/gi,"[MAC]").replace(/(?:\d{1,3}\.){3}\d{1,3}/g,"[IP]").replace(/(?:APP_USR|TEST)-[\w-]+/g,"[TOKEN]").replace(/[\w.+-]+@[\w.-]+\.[A-Za-z]{2,}/g,"[EMAIL]").slice(0,700)).join("\n")));'