Repository navigation
Commit 0cc89f9
committed
chore(deps): bump the python-minor group (Dependabot #215)
Applies Dependabot #215 (python-minor group, 4 updates) to backend/ and
moves backend/uv.lock with it, which #215 leaves behind: Dependabot's
pip PRs never update the lock, so #215 alone fails the lock-parity step.
PR #215 replaced #212, which Dependabot closed at 19:32Z once main moved
to 6e56e85; #212's versions beyond main were these same four.
sentry-sdk[fastapi] 2.71.0 -> 2.72.0 pyproject.toml
starlette 1.7.0 -> 1.8.0 pyproject.toml
dev: ast-serialize 0.12.1 -> 0.13.0 via mypy
dev: truststore 0.10.4 -> 0.10.5 via httpcore2
No other pin moves. requirements.txt keeps its 47 pins, 45 of them
byte-identical; requirements-dev.txt keeps 20, 18 identical; uv.lock
changes only these four packages and the project's own requires-dist.
filelock stays out: #212 still offered 4.1.1, and paired pydantic
2.14.1 with pydantic-core 2.46.5; neither is taken. pyproject.toml and
both requirements files are byte-identical to #215's head (aef8699),
which is still its head on 2026-10-21.
Cooldown and yanks, from PyPI: sentry-sdk 2.72.0 was uploaded on
2026-10-12, starlette 1.8.0 on 2026-10-13 at 07:54Z, ast-serialize
0.13.0 and truststore 0.10.5 on 2026-10-12; none is yanked. All 63
hashes of the four pins are published files of those versions, and
every published file is hashed. starlette 1.9.0 (2026-10-18) and
ast-serialize 0.13.1 (2026-10-17) were uploaded after the cutoff of
the 7-day cooldown (2026-10-13 when this was prepared, 2026-10-14 at
landing) and are not taken. Re-checked against PyPI on 2026-10-21.
Regenerated in backend/ with uv 0.13.1:
uv lock -P sentry-sdk==2.72.0 -P starlette==1.8.0
-P ast-serialize==0.13.0 -P truststore==0.10.5
uv pip compile pyproject.toml -o requirements.txt --generate-hashes
--python-platform x86_64-unknown-linux-gnu --python-version 3.14
-P sentry-sdk==2.72.0 -P starlette==1.8.0
python scripts/gen-dev-requirements.py backend (from the repo root)
scripts/check-lock-parity.py passes (47 + 20 + 23 pins) and
uv lock --check exits 0. Re-running the header command and the
dev-delta script changes neither file, and a no-extras
uv export --frozen matches requirements.txt pin for pin.
starlette 1.8.0, read from its release notes and a diff of the two
wheels: routing.py is unchanged, so the route matching that slowapi
0.1.10 and performance.py's _resolve_route_template depend on is the
same code. What does change: BaseHTTPMiddleware closes stream()
generators with aclosing, passes send and forwards 103 Early Hints;
GZipMiddleware starts already-encoded, 206 and excluded responses at
once, excludes gRPC types and keeps trailers; FileResponse ignores
If-Range with a weak ETag and, for a multi-range response, raises on a
file shorter than its range; the multipart charset is looked up once;
URL.replace brackets IPv6 hosts; Python 3.11 is the floor (the project
needs 3.11). Two changes reach clients of this API:
- StaticFiles answers every method other than GET and HEAD with 405,
as before, and now adds "Allow: GET, HEAD" (starlette #3640). That
covers both mounts, /static and /media, for an existing or a missing
file: POST, PUT, DELETE, PATCH, OPTIONS without a CORS preflight, and
any other method (TRACE and PROPFIND were tried). A real preflight is
still answered by CORSMiddleware and never reaches the mount.
- FileResponse now listens for a client disconnect while it streams,
reading receive() whenever the server speaks ASGI below 2.4, and
stops when it sees one (#3523); uvicorn 0.54.0 speaks 2.3. That
listener made the counting_receive bug in BodySizeLimitMiddleware
reachable: a GET for a file under /static or /media with a chunked
body over the 5 MB cap got the file cut off under its full
Content-Length, an ASGI exception and a Sentry error event. The
previous commit fixes it. With it, such a GET gets the whole file.
The server also reads a GET's request body for as long as it streams
the file, where 1.7.0 left it unread, so an upload that ends before
the file now completes instead of being cut off with the response.
sentry-sdk 2.72.0: the ASGI middleware sets user_agent.original and
sentry.is_localhost scope attributes, the FastAPI sync-handler wrapper
moves into the Starlette integration and stays idempotent, and the
scrubber also scrubs JSON-array request bodies.
Evidence. On 2026-10-20 this change was checked on top of 6e56e85
(python:3.14-slim 3.14.6, without the previous commit), with
origin/main's pins as the baseline. On 2026-10-21 it was checked again
as it lands: this tree, built with no cache on the 3.14.8 base, against
an image of origin/main (6e56e85). Both times against a fresh
postgres:17-alpine (17.11), served over real HTTP by uvicorn on uvloop
with the Dockerfile's proxy flags.
- (a) Default limit: /api/v1/health and /api/v1/oss/contributions
answer 100 x 200, then 429 with Retry-After: 60 and the app's own
JSON body. Another client IP still gets 200 on the same route, and
the exhausted IP still gets 200 on another undecorated route. The
120/minute tier on /api/v1/projects/ answers 120 x 200, then 429, so
the default bucket does not double-count it.
- (b) Auth limit, 5/minute: /auth/github answers 5 x 307,
/auth/github/callback 5 x 302 and POST /auth/refresh 5 x 401, each
then 429. A verified token from the exhausted IP gets its own bucket
(401, not 429).
- (c) Metric keys: 28 detail requests on companies, projects, skills
and education (8 of them for missing ids) land on 4 route-template
keys, such as "GET /api/v1/companies/{company_id}" (10 requests, 2
errors); on 2026-10-21, 20 such requests (8 for missing ids) land on
the same 4 keys, 5 requests and 2 errors each. Only the 2 requests
that match no route keep their raw path, by design.
(a) to (c) are identical on main's pins, both times. On 2026-10-20
they were identical again with Sentry initialised against a local
sink at a 1.0 trace rate: 376 transactions on both, named by route
template, and no error events. The exceptions are named by URL on
both pin sets: the default-limit 429s, which the middleware answers
before routing, and the no-route 404s.
- scripts.migrate on a fresh database creates the schema, stamps
b41f7ac2e905 and seeds 8 companies, 3 projects, 20 skills, 4
education items and the CV profile; a second run takes the upgrade
path; alembic check finds nothing. In development and production
mode, the public reads answer 200 and POST
/api/v1/analytics/track/pageview stores its row in PostgreSQL, with
the session id and a 16-character IP hash. On 2026-10-21 the same
holds in production mode for this image's release command and its
page views; both images also log the engine-disposal tracebacks
("Event loop is closed") that scripts/migrate.py prints on every
run, and exit 0.
- Masked HTTP diff of 2026-10-20, 42 responses per mode. It covers
bodies and every header except Date, X-Request-ID and
X-Response-Time, with UUIDs, timestamps, ETags and gzip lengths
masked. The requests cover CORS (simple and preflight, allowed and
refused origins), Vary, the security headers, HSTS and CSP, gzip on
JSON and on files, the https 307 slash redirect, 404, 422 and 401,
both 413 paths (Content-Length and chunked), a multipart upload, and
Range, multi-range and If-Range on /static and /media. Its one
difference is the 405 for POST on /static, which now carries Allow:
GET, HEAD. It sent no other method to the mounts and no GET with a
request body, so it could not show the full Allow change or the
truncation.
- Masked HTTP diff of 2026-10-21, this image against 6e56e85's, masked
the same way: 136 responses with 2198 header lines, covering the same
kinds of request plus every method on both mounts and GETs with
request bodies; the 12 upload responses and (a) to (c) were compared
too. Of the 41 header differences, 40 are one added "allow: GET,
HEAD" on a 405 from /static or /media, with status and body
unchanged. The other is the multipart/byteranges boundary, which
starlette draws at random for every response (the masked bodies are
equal). Two differences are not in the headers: a client that reads
slowly while it sends a GET body got its file cut off on 6e56e85,
when the server reset the connection, and now gets the whole file;
and the upload of a GET with a chunked body now completes (see
above). The socket of two 413 uploads ends with a reset or a broken
pipe, which 10 repeats show both ways on both images.
- Chunked GETs on 2026-10-21: 35 downloads (both PDFs under /static,
a 3 MB file and a small one under /media, with bodies from 4 to 12
MB) all answer 200 with the file byte for byte; the app logs no ASGI
exception, and a local Sentry sink (SENTRY_DSN, traces at 1.0) gets
no error event over the whole run. An image of this tree without
the previous commit truncated 10 of 18 downloads with a body over
the cap, with 10 ASGI exceptions and 10 error events.
- Upload caps on 2026-10-21, the same on both images: an anonymous 6 MB
upload gets 413 "Maximum size is 5 MB" with Content-Length and
chunked, and so does a pageview just over 5 MB; an authenticated 27
MB upload gets 413 at 26 MB both ways; an authenticated small PDF,
sent either way, answers 200 and reads back from /media byte for
byte, and 10 MB chunked answers 200.
- docker build of backend/ installs the 47 pins without source builds.
The image's release command migrates a fresh database, and its CMD
runs as appuser on uvloop. The HEALTHCHECK reports healthy, and the
image's 42 production responses equal the run above. Only the
Content-Length of the health responses differs, because their bodies
carry uptime and latency. On 2026-10-21, docker build --no-cache of
this tree ran every step on the 3.14.8 base: no source builds, pip
check clean, Python 3.14.8, the compiled extensions (uvloop,
httptools, asyncpg, pydantic-core, cryptography and the rest) load;
the HEALTHCHECK turns healthy in about 6 s and stays healthy through
the probes.
- CI mirror (python:3.14.8, clean exports): on 2026-10-20, of this
change on 6e56e85, parity, hash-locked installs of both files (47 +
17 packages), pip check, ruff check, ruff format --check, pytest 961
passed at 94.92% (floor 83), and mypy with no issues in 65 files;
main gave the same 961 at 94.92%. On 2026-10-21, this tree and the
previous commit both pass the same steps, with 963 passed at 95.21%.
Warnings: 449 against main's 445 on 2026-10-20, and 446 here against
448 for the previous commit. The differences are SQLite "unclosed
database" ResourceWarnings (38 against 34, then 35 against 37). They
land on whichever test is running when the collector finalises a
SQLite connection that an earlier test created. On 2026-10-20 each
run had 15 tests that carry one, and the two runs shared only 7 of
them; one candidate test that carries one is a schema test that
never opens SQLite. With a gc.collect() at every teardown, both trees
gave 961 passed and the same 411 warnings, none of them a
ResourceWarning.
Pre-existing, the same on main and not changed here: when Sentry is
on, the SDK sends the Fly-Client-IP request header, which holds the
client IP, with every transaction. Its send_default_pii=False header
filter knows X-Forwarded-For and X-Real-IP, but not Fly-Client-IP.
Supersedes #215 and the closed #212.1 parent 2ff75c7 commit 0cc89f9
4 files changed
Lines changed: 140 additions & 140 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
463 | | - | |
464 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1042 | 1042 | | |
1043 | 1043 | | |
1044 | 1044 | | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1048 | 1048 | | |
1049 | 1049 | | |
1050 | 1050 | | |
| |||
1126 | 1126 | | |
1127 | 1127 | | |
1128 | 1128 | | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| |||
0 commit comments