[diagnostic - do not merge] staging rankings year probe #9
@@ -0,0 +1,26 @@
|
||||
# TEMPORARY diagnostic workflow — delete after the rankings year= bug is closed.
|
||||
name: Staging Rankings Diagnostic
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- diag/staging-rankings-year
|
||||
|
||||
jobs:
|
||||
staging-api-diagnostic:
|
||||
name: Staging rankings year diagnostic
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Probe staging rankings year handling
|
||||
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
|
||||
Reference in New Issue
Block a user