2.1 KiB
2.1 KiB
| title | description | type | domain | tags | ||||
|---|---|---|---|---|---|---|---|---|
| Database API Release — 2026.4.1 | Query limit caps to prevent worker timeouts, plus hotfix to exempt /players endpoint. | reference | major-domo |
|
Database API Release — 2026.4.1
Date: 2026-04-01
Tag: 2026.3.7 + 3 post-tag commits (CI auto-generates CalVer on merge)
Image: manticorum67/major-domo-database
Server: akamai (~/container-data/sba-database)
Deploy method: docker compose pull && docker compose down && docker compose up -d
Release Summary
Added bounded pagination (MAX_LIMIT=500, DEFAULT_LIMIT=200) to all list endpoints to prevent Gunicorn worker timeouts caused by unbounded queries. Two follow-up fixes corrected response count fields in fieldingstats that were computed after the limit was applied. A hotfix (PR #103) then removed the caps from the /players endpoint specifically, since the bot and website depend on fetching full player lists.
Changes
Bug Fixes
- PR #99 — Fix unbounded API queries causing Gunicorn worker timeouts. Added
MAX_LIMIT=500andDEFAULT_LIMIT=200constants independencies.py, enforcedle=MAX_LIMITon all list endpoints. Added middleware to strip empty query params preventing validation bypass. - PR #100 — Fix fieldingstats
get_fieldingstatscount: capturedtotal_countbefore.limit()so the response reflects total rows, not page size. - PR #101 — Fix fieldingstats
get_totalstats: removed line that overwrotecountwithlen(page)after it was correctly set fromtotal_count.
Hotfix
- PR #103 — Remove output caps from
GET /api/v3/players. Revertedlimitparam toOptional[int] = Query(default=None, ge=1)(no ceiling). The/playerstable is a bounded dataset (~1500 rows/season) and consumers depend on uncapped results. All other endpoints retain their caps.
Deployment Notes
- No migrations required
- No config changes
- Rollback:
docker compose pull manticorum67/major-domo-database:<previous-tag> && docker compose down && docker compose up -d