Skip to content

fix(docker): tear down matrix-started external DBs after smoke (#1516) - #1543

Merged
natechadwick merged 1 commit into
developmentfrom
feature/matrix-install-smoke-db-teardown
Jul 27, 2026
Merged

fix(docker): tear down matrix-started external DBs after smoke (#1516)#1543
natechadwick merged 1 commit into
developmentfrom
feature/matrix-install-smoke-db-teardown

Conversation

@natechadwick-intsof

Copy link
Copy Markdown
Collaborator

Summary

  • After matrix-install-smoke finishes (pass or fail), stop external compose DBs that this process started (compose stop; no volume wipe).
  • Reuse pre-existing operator-owned DB containers by default and leave them running unless --stop-db.
  • Add --keep-db (leave DBs, destroy cells) and --stop-db (hard-stop all engaged external DBs); --keep still leaves cells and DBs for Playwright Layer 2.
  • Document teardown policy in docker/README.md and harness help; unit tests cover ownership decision logic without live Docker.

Closes #1516

Test plan

  • python -m pytest docker/scripts/test_matrix_install_smoke.py -v25 passed
  • python docker/scripts/matrix-install-smoke.py --help shows --keep-db / --stop-db
  • Optional live smoke: --product cms --db postgresql then confirm percussion-postgres is stopped when matrix started it
  • Optional: pre-start postgres, run matrix without --stop-db, confirm container left running
  • Optional: --keep leaves cell + DB; --keep-db destroys cell but leaves DB

Pre-PR verification

  • Maven clean install: N/A — Python/docs only (no module pom.xml / Java sources changed).
  • Erlang pre-commit: approve — docs/ai-generated/code-reviews/1516-matrix-install-smoke-db-teardown-erlang.md
  • Unit tests: docker/scripts/test_matrix_install_smoke.py (25 passed)

Co-Authored by Grok Build (xAI) Grok 4.5 using grok-4.5 with agent Grok.

Stop external compose DB containers that matrix-install-smoke started,
while reusing and preserving pre-existing operator-owned DBs by default.
Add --keep-db / --stop-db, document policy, and cover ownership logic
with unit tests (no live Docker).

Co-Authored by Grok Build (xAI) Grok 4.5 using grok-4.5 with agent Grok.
@kilo-code-bot

kilo-code-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • docker/README.md - Documentation updates
  • docker/scripts/matrix-install-smoke.py - DB ownership tracking and teardown logic
  • docker/scripts/test_matrix_install_smoke.py - Policy and dry-run unit tests
  • docs/ai-generated/code-reviews/1516-matrix-install-smoke-db-teardown-erlang.md - Pre-commit review doc

Reviewed by step-3.7-flash · Input: 67.4K · Output: 11.3K · Cached: 436.1K

Review guidance: REVIEW.md from base branch development

@natechadwick
natechadwick merged commit f6f37d2 into development Jul 27, 2026
7 checks passed
@natechadwick
natechadwick deleted the feature/matrix-install-smoke-db-teardown branch July 27, 2026 22:28
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.

matrix-install-smoke: tear down external DB containers when matrix finishes

2 participants