chore(ci): diagnostic v2 — capture headers to attribute the 500s
Staging Rankings Diagnostic / Staging rankings year diagnostic (push) Successful in 1s
Staging Rankings Diagnostic / Staging rankings year diagnostic (push) Successful in 1s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,12 +15,14 @@ jobs:
|
||||
env:
|
||||
BASE: ${{ secrets.STAGING_BASE_URL }}
|
||||
run: |
|
||||
echo "== /api/filters years =="
|
||||
curl -s --max-time 15 "$BASE/api/filters" -o /tmp/f.json -w "status %{http_code}\n"
|
||||
python3 -c "import json; print(json.load(open('/tmp/f.json')).get('years'))" || head -c 300 /tmp/f.json
|
||||
echo "== /api/rankings probes (metric=rwm_expected_pct, limit=3) =="
|
||||
for Q in "" "&year=202425" "&year=201819" "&year=2024"; do
|
||||
CODE=$(curl -s --max-time 15 -o /tmp/r.json -w "%{http_code}" "$BASE/api/rankings?metric=rwm_expected_pct&limit=3$Q")
|
||||
echo "query [$Q] -> status $CODE"
|
||||
python3 -c "import json; d=json.load(open('/tmp/r.json')); print(' year:', d.get('year'), 'total:', d.get('total'), 'rows:', len(d.get('rankings', [])))" || head -c 300 /tmp/r.json
|
||||
done
|
||||
probe() {
|
||||
echo "== $1 =="
|
||||
curl -s --max-time 15 -D /tmp/h.txt -o /tmp/b.txt "$BASE$1"
|
||||
echo "--- headers:"; cat /tmp/h.txt
|
||||
echo "--- body (first 400 bytes):"; head -c 400 /tmp/b.txt; echo
|
||||
}
|
||||
probe "/api/data-info"
|
||||
probe "/api/filters"
|
||||
probe "/api/rankings?metric=rwm_expected_pct&limit=3"
|
||||
probe "/api/rankings?metric=rwm_expected_pct&limit=3&year=202425"
|
||||
probe "/"
|
||||
|
||||
Reference in New Issue
Block a user