docs: sync KB — database-release-2026.4.1.md
This commit is contained in:
parent
98c69617ff
commit
51389c612a
34
major-domo/database-release-2026.4.1.md
Normal file
34
major-domo/database-release-2026.4.1.md
Normal file
@ -0,0 +1,34 @@
|
||||
---
|
||||
title: "Database API Release — 2026.4.1"
|
||||
description: "Query limit caps to prevent worker timeouts, plus hotfix to exempt /players endpoint."
|
||||
type: reference
|
||||
domain: major-domo
|
||||
tags: [release-notes, deployment, database, hotfix]
|
||||
---
|
||||
|
||||
# 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=500` and `DEFAULT_LIMIT=200` constants in `dependencies.py`, enforced `le=MAX_LIMIT` on all list endpoints. Added middleware to strip empty query params preventing validation bypass.
|
||||
- **PR #100** — Fix fieldingstats `get_fieldingstats` count: captured `total_count` before `.limit()` so the response reflects total rows, not page size.
|
||||
- **PR #101** — Fix fieldingstats `get_totalstats`: removed line that overwrote `count` with `len(page)` after it was correctly set from `total_count`.
|
||||
|
||||
### Hotfix
|
||||
- **PR #103** — Remove output caps from `GET /api/v3/players`. Reverted `limit` param to `Optional[int] = Query(default=None, ge=1)` (no ceiling). The `/players` table 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`
|
||||
Loading…
Reference in New Issue
Block a user