Skip to content

[11] Make cph-staging the deployable source of truth (BACKEND_URL self-trigger, smoke UA, DEPLOY_DIR) - #28

Merged
chondl merged 2 commits into
cph-stagingfrom
cph-deployable-source
Jul 21, 2026
Merged

[11] Make cph-staging the deployable source of truth (BACKEND_URL self-trigger, smoke UA, DEPLOY_DIR)#28
chondl merged 2 commits into
cph-stagingfrom
cph-deployable-source

Conversation

@chondl

@chondl chondl commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Reconciles cph-staging with what the mirror actually runs, so the branch is the deployable source of truth (and every change to cph-staging is captured in a PR).

  • backend/src/constants.py — make BACKEND_URL env-configurable. Production was deployed from a local-only, un-pushed commit (0492388) carrying this exact change; cph-staging lacked it, so deploying cph-staging as-is would have broken the single-container self-trigger (it would hit upstream api.statbotics.io instead of the mirror's own backend). This lands that change on cph-staging. (Same change is also folded into the re-arch PR [05] Retire the database: db-less pipeline + /v3 + /v3/site (+ BACKEND_URL env config) #23 [05].)
  • docs/superpowers/rig/smoke/smoke.py — send a browser User-Agent. Cloudflare 403s the default Python-urllib UA, which made the smoke suite report false failures against the live mirror.
  • docs/superpowers/rig/deploy/MakefileDEPLOY_DIR.worktrees/cph-staging, so deploys build the cph-staging branch instead of the retiring staging branch.

After merge: cph-staging backend/ == production code, deploy points at cph-staging, and staging can be retired.

chondl added 2 commits July 20, 2026 22:01
…s own ETL

The freshness ping probe and the cron's update_curr_year_background HTTP-call
BACKEND_URL to reach the data router. It was hardcoded to upstream
api.statbotics.io under PROD, so on the single-container mirror the self-trigger
hit the (down) upstream instead of the mirror's own backend and ingestion never
ran — live offseason match updates never landed. Read BACKEND_URL from env
(fallback to the old default) and set it to the mirror's run.app URL at deploy.
…eploys cph-staging

- smoke.py: install a global opener with a browser User-Agent so live-mirror
  checks aren't 403'd by Cloudflare's bot filter (was reporting false failures).
- Makefile: DEPLOY_DIR -> .worktrees/cph-staging so deploys build the cph-staging
  branch (the deployed fork line), not the retiring 'staging' branch.
@chondl
chondl merged commit 18a800f into cph-staging Jul 21, 2026
@chondl
chondl deleted the cph-deployable-source branch July 21, 2026 05:02
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