[11] Make cph-staging the deployable source of truth (BACKEND_URL self-trigger, smoke UA, DEPLOY_DIR) - #28
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reconciles
cph-stagingwith what the mirror actually runs, so the branch is the deployable source of truth (and every change tocph-stagingis captured in a PR).backend/src/constants.py— makeBACKEND_URLenv-configurable. Production was deployed from a local-only, un-pushed commit (0492388) carrying this exact change;cph-staginglacked it, so deployingcph-stagingas-is would have broken the single-container self-trigger (it would hit upstreamapi.statbotics.ioinstead of the mirror's own backend). This lands that change oncph-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 defaultPython-urllibUA, which made the smoke suite report false failures against the live mirror.docs/superpowers/rig/deploy/Makefile—DEPLOY_DIR→.worktrees/cph-staging, so deploys build thecph-stagingbranch instead of the retiringstagingbranch.After merge:
cph-stagingbackend/== production code, deploy points atcph-staging, andstagingcan be retired.