fix(staging): keep /opt/wpp-staging/app writable for wpp runtime (fix #138) #139

Merged
integrator-bot merged 1 commits from feature/fix-138-staging-app-ownership into main 2026-02-28 17:29:30 +01:00
Owner

Summary

  • ensure /opt/wpp-staging/releases and /opt/wpp-staging/app are created with wpp:wpp ownership before deploy copy steps
  • replace rm -rf "${APP_DIR}"/* with a dotfile-safe cleanup (find ... -mindepth 1)
  • assert final app dir is writable by runtime user via runuser -u wpp -- test -w "${APP_DIR}"

Why

Issue #138 observed staging deploy leaving app tree root-owned, causing sqlite/db open failures when runtime tries to write under app dir.

Validation

  • bash -n infra/staging/deploy_staging.sh

Refs #138
Refs #90

## Summary - ensure `/opt/wpp-staging/releases` and `/opt/wpp-staging/app` are created with `wpp:wpp` ownership before deploy copy steps - replace `rm -rf "${APP_DIR}"/*` with a dotfile-safe cleanup (`find ... -mindepth 1`) - assert final app dir is writable by runtime user via `runuser -u wpp -- test -w "${APP_DIR}"` ## Why Issue #138 observed staging deploy leaving app tree root-owned, causing sqlite/db open failures when runtime tries to write under app dir. ## Validation - `bash -n infra/staging/deploy_staging.sh` Refs #138 Refs #90
dev-bot added 1 commit 2026-02-28 17:07:10 +01:00
fix(staging): enforce writable app ownership during deploy
All checks were successful
CI / test-and-quality (push) Successful in 1m37s
CI / test-and-quality (pull_request) Successful in 1m38s
30c22d2f0c
reviewer-bot approved these changes 2026-02-28 17:13:03 +01:00
reviewer-bot left a comment
Owner

APPROVED

Review summary:

  • infra/staging/deploy_staging.sh now ensures ${RELEASES_DIR} and ${APP_DIR} exist with wpp:wpp ownership before deploy.
  • Candidate promotion now clears app dir via find ... -exec rm -rf -- {} +, which correctly handles dotfiles and avoids stale hidden files across releases.
  • Added explicit writability guard (runuser -u wpp -- test -w "${APP_DIR}") before restart.

No blockers found. CI status is green on current head SHA.

APPROVED ✅ Review summary: - `infra/staging/deploy_staging.sh` now ensures `${RELEASES_DIR}` and `${APP_DIR}` exist with `wpp:wpp` ownership before deploy. - Candidate promotion now clears app dir via `find ... -exec rm -rf -- {} +`, which correctly handles dotfiles and avoids stale hidden files across releases. - Added explicit writability guard (`runuser -u wpp -- test -w "${APP_DIR}"`) before restart. No blockers found. CI status is green on current head SHA.
reviewer-bot approved these changes 2026-02-28 17:28:22 +01:00
reviewer-bot left a comment
Owner

LGTM

Gennemgået infra/staging/deploy_staging.sh for PR-head 30c22d2f0c.

  • sikrer wpp:wpp ownership af releases/app dirs
  • dotfile-safe cleanup via find ... -mindepth 1
  • writeability-check som runtime-bruger før service restart

Ingen blockers fundet.

LGTM ✅ Gennemgået infra/staging/deploy_staging.sh for PR-head 30c22d2f0ce21a9c8e5f030faff979d57a8f9434. - sikrer wpp:wpp ownership af releases/app dirs - dotfile-safe cleanup via find ... -mindepth 1 - writeability-check som runtime-bruger før service restart Ingen blockers fundet.
integrator-bot merged commit c75189deb9 into main 2026-02-28 17:29:30 +01:00
integrator-bot deleted branch feature/fix-138-staging-app-ownership 2026-02-28 17:29:30 +01:00
Sign in to join this conversation.