Skip to content

Fix pydantic-settings 2.16 env decoding regression and a serve-test race - #48

Merged
ggapp1 merged 2 commits into
mainfrom
fix/settings-json-decode-and-serve-race
Nov 16, 2026
Merged

ggapp1 merged 2 commits into
mainfrom
fix/settings-json-decode-and-serve-race

Conversation

@ggapp1

@ggapp1 ggapp1 commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Two causes behind the failing runs (weekly Fresh deps since 2026-11-02, Dependabot #46, and one ubuntu job on #45).

pydantic-settings 2.16 regression. From 2.16, an Any leaf under apps: dict[str, dict[str, Any]] is no longer JSON-decoded from the environment, so DUDAMEL_APPS__X__LIST='["a"]' arrived as a string and a list- or dict-typed app setting would fail validation. Fresh installs already resolve 2.16 (floor is >=2.3). The env and .env sources are now wrapped to decode each [apps.*] leaf when it parses as JSON and keep the raw string otherwise — the 2.14 behaviour, independent of the installed version. TOML values are untouched (a quoted TOML string stays a string).

New tests cover list/table/plain-string env values, .env, and the TOML non-decode case. Without the fix they fail on 2.16.2; full suite passes on both 2.14.2 and 2.16.2 (1167 tests).

test_serve race. Since #39 a job writes a running row at start; test_serve.poll_job_runs returned the first row it saw, so test_cancelling_serve_task_shuts_down_cleanly could read running instead of ok. It now waits for a finished row, matching the helper in test_scheduler.py.

@ggapp1
ggapp1 merged commit 0836bb4 into main Nov 16, 2026
8 checks passed
@ggapp1
ggapp1 deleted the fix/settings-json-decode-and-serve-race branch November 16, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant