Skip to content

[05] Retire the database: db-less pipeline + /v3 + /v3/site (+ BACKEND_URL env config) - #23

Open
chondl wants to merge 8 commits into
cph-duckdb-apifrom
cph-db-retirement
Open

[05] Retire the database: db-less pipeline + /v3 + /v3/site (+ BACKEND_URL env config)#23
chondl wants to merge 8 commits into
cph-duckdb-apifrom
cph-db-retirement

Conversation

@chondl

@chondl chondl commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Replacement for #11 (auto-closed by branch rename). Part of the cph-staging series.

chondl added 8 commits July 10, 2026 14:46
The noteworthy/upcoming DuckDB reads join matches and events, so they must
resolve both from a single manifest generation. Capture base = _sync() once per
query and pass it to _source, matching the base-threaded signature the atomic
Parquet set introduced on duckdb-api.
…ndependent

A4: when db-less mode seeds a cross-season EPA with no prior-year team_years
(a partial/forgotten backfill), log a prominent warning and set a flag exposed
via /info, instead of silently regressing every team to the rookie mean. Also
move the historical parquet write out of the DISABLE_DB branch so db-less
backfill still produces parquet.
The DuckDB read path for /v3/site noteworthy matches must match the SQLAlchemy
path: offseason events (EventType.OFFSEASON) have modified rules, so their
scores are excluded from the noteworthy-match leaderboards. Mirrors the
exclusion in src/db/functions/noteworthy_matches.py. Harmless when no offseason
events are present (the filter matches nothing to exclude).
The ETL self-trigger (update_curr_year_background, the freshness-ping probe)
HTTP-calls BACKEND_URL to reach the data router. Hardcoded to upstream
api.statbotics.io under PROD, a single-container deploy that serves all routers
from one service (e.g. a staging mirror) sent its self-trigger to the wrong host
and never ran ingestion. Read BACKEND_URL from env with the original default as
fallback; the deploy sets it to the service's own URL.

Verified on the staging mirror: with BACKEND_URL set to the mirror's own API,
page-view pings now drive live ingestion (2026iri caught up to TBA in real time).
@chondl chondl changed the title [blob-store 5/5] Retire the database: pipeline + /v3 + /v3/site db-less behind DISABLE_DB [05] Retire the database: db-less pipeline + /v3 + /v3/site (+ BACKEND_URL env config) Jul 19, 2026
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