35 lines
2.5 KiB
Python
35 lines
2.5 KiB
Python
# Per-recipe harness config for ghost (Phase 2 Q4.4 — Node.js publishing platform).
|
||
# Ghost serves an HTML site at `/`; admin UI at `/ghost/`. The first GET to /ghost/ redirects
|
||
# to the setup wizard (302). Ghost exposes a JSON Content API at /ghost/api/content/ which
|
||
# requires an API key; the Admin API at /ghost/api/admin/ requires a session/token (see
|
||
# functional/_ghost.py — version-negotiated, no /v3/ path).
|
||
# State lives in a **MySQL** `ghost` DB (compose `db` service, mysql:8.0) + the `ghost_content`
|
||
# volume (themes/images) — NOT sqlite. The `db` service is backupbot-labelled with a logical
|
||
# mysqldump pre-hook; P4 (ops.py + test_{backup,restore,upgrade}.py) seeds a `ci_marker` row there.
|
||
HEALTH_PATH = "/" # Ghost serves a themed site HTML at root (200)
|
||
HEALTH_OK = (200,)
|
||
DEPLOY_TIMEOUT = 1200 # subprocess timeout for `abra app deploy`
|
||
HTTP_TIMEOUT = 900
|
||
|
||
# Ghost's fresh-DB first boot runs a full schema migration (dozens of CREATE TABLEs, each a separate
|
||
# MySQL round-trip → ~6-9min on cc-ci, round-trip-bound so more vCPU doesn't help). The published
|
||
# recipe healthcheck used `start_period: 1m` (+10×30s ≈ 6min grace) — too tight on cc-ci: swarm kills
|
||
# the still-migrating task, leaving a stale `migrations_lock` → every later task deadlocks
|
||
# (`MigrationsAreLockedError`).
|
||
#
|
||
# FIXED IN THE RECIPE-PR (recipe-maintainers/ghost#1, branch ci/mysql-backup): the app-service
|
||
# healthcheck `start_period` is bumped to a literal 15m in the recipe itself — the real recipe
|
||
# everyone runs, NOT a cc-ci compose fork. This is the plan §9 / plan-prefer-env-over-compose-overlay.md
|
||
# anti-drift path: start_period CANNOT be expressed as an env var (abra validates the literal compose
|
||
# 'duration' format BEFORE env substitution — `${VAR}` / `"${VAR:-1m}"` → FATA 'Does not match format
|
||
# duration'; reproduced by the Adversary, REVIEW-2 4b862f6), so a literal recipe-PR bump is the only
|
||
# §9-compliant way to widen it. Precedent: discourse + lasuite-drive collabora start_period recipe-PRs.
|
||
# start_period only widens the startup grace window (a healthy check still marks healthy at once → fast
|
||
# hosts unaffected); NO test/assertion is weakened. With the bump in the recipe, the former cc-ci
|
||
# DEPLOY overlay (`compose.ccci-health.yml` + `install_steps.sh` + COMPOSE_FILE + CHAOS_BASE_DEPLOY)
|
||
# is DELETED. TIMEOUT 1200s = migration (≤9min) + convergence, bounded so a genuine failure still
|
||
# fails (not a long blackout). See DECISIONS (ghost MySQL cold-boot / start_period recipe-PR).
|
||
EXTRA_ENV = {
|
||
"TIMEOUT": "1200",
|
||
}
|