Skip to content

feat: require live post-deploy health probe - #38

Merged
ROBJkE merged 1 commit into
mainfrom
cursor/deploy-health-probe-ce06
Sep 18, 2026
Merged

ROBJkE merged 1 commit into
mainfrom
cursor/deploy-health-probe-ce06

Conversation

@ROBJkE

@ROBJkE ROBJkE commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Locked contract

  1. Default probe URL when no override: take APP_URL, strip trailing slash, append /api/_info/health-check (Shopware Core health path; same as compose container healthcheck path).
  2. Optional override: DEPLOY_HEALTH_URL — full URL used as-is (e.g. loopback http://127.0.0.1:8000/api/_info/health-check).
  3. No SMOKE_URL. The old name is not read, not aliased, and does not drive the probe.
  4. Live require: when SHOPWARE_DEPLOY_ENV is live (case-insensitive), release and rollback refuse at bootstrap if neither DEPLOY_HEALTH_URL nor a non-empty APP_URL can produce a probe URL.
  5. Escape hatch (ops only): --allow-no-deploy-health and/or ALLOW_NO_DEPLOY_HEALTH=1 (truthy). Documented as ops escape only.
  6. Non-live: if no URL can be resolved, skip the probe (same as today’s skip). Do not require APP_URL on staging/dev.
  7. Operator-facing strings use deploy health / DEPLOY_HEALTH_URL (logs, errors, dry-run, help).
  8. Probe behavior otherwise unchanged: curl -fsS, 30 attempts, 2s sleep. Auto-rollback on probe failure uses ROLLBACK_ON_FAIL (explicit 1/0 wins; unset → on for live, off otherwise). No alias for ROLLBACK_ON_SMOKE_FAIL.

recipes/shopware-cd is not changed in this PR.

APP_URL empty vs whitespace

  • File parser trims values, so APP_URL= and APP_URL=<spaces> in a .env file are both empty.
  • Process-env APP_URL that is only whitespace is still non-empty for ShopEnv::get / PROCESS_WINS, but probe resolve trims it and cannot produce a URL — live still refuses.
  • Process-env IMAGE_TAG still wins over .env IMAGE_TAG=latest (existing tests kept).

Test plan

  • cargo test --locked (unit + integration): URL resolve, trailing-slash join, live refuse, escape hatch, SMOKE_URL ignored, ROLLBACK_ON_FAIL (old name ignored).
Open in Web Open in Cursor 

Resolve the probe from DEPLOY_HEALTH_URL or APP_URL + /api/_info/health-check.
Live refuses without a URL unless --allow-no-deploy-health / ALLOW_NO_DEPLOY_HEALTH=1.
Rename ROLLBACK_ON_SMOKE_FAIL to ROLLBACK_ON_FAIL (no alias). Do not read SMOKE_URL.

Co-authored-by: ROBJkE <ROBJkE@users.noreply.github.com>
@ROBJkE
ROBJkE marked this pull request as ready for review September 18, 2026 07:01
@ROBJkE
ROBJkE merged commit 6ebc324 into main Sep 18, 2026
1 check passed
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.

2 participants