Skip to content

feat(deploy): orchestrate deployment readiness, decouple backend liveness, and fix PrismaPg#2762

Merged
DerekRoberts merged 4 commits into
mainfrom
feat/e2e-healthcheck-sync
Jun 12, 2026
Merged

feat(deploy): orchestrate deployment readiness, decouple backend liveness, and fix PrismaPg#2762
DerekRoberts merged 4 commits into
mainfrom
feat/e2e-healthcheck-sync

Conversation

@DerekRoberts

@DerekRoberts DerekRoberts commented Jun 12, 2026

Copy link
Copy Markdown
Member

Overview

This PR optimizes OpenShift template deployments, container orchestration, and health probing across the database, backend, and frontend services. It resolves a critical runtime schema resolution bug in the backend, decouples backend liveness checks from downstream database status to prevent cascading outages, replaces high-overhead shell-out probes with lightweight native checks, and blocks the frontend rollout until the backend service is ready.

There are no CI/workflow changes; the e2e test environment stability is achieved purely through corrected Kubernetes orchestration and templates.

Changes

Frontend (frontend/openshift.deploy.yml)

  • Backend Syncing: Added a wait-for-backend initContainer to hold the frontend rollout until the backend's /api/health endpoint responds with success. This cleanly prevents the frontend from starting up when the backend is not yet ready to serve requests.
  • Probe Bypass: Exposed port 3001 (health) and switched startup, readiness, and liveness probes to query /health on that port, bypassing the Coraza WAF middleware and avoiding log clutter.

Backend

  • Database Schema Fix (backend/src/prisma.service.ts): Passed { schema: DB_SCHEMA } to the PrismaPg driver adapter. Previously, the custom Postgres schema was ignored because the pg Pool wrapper does not parse connection string query parameters, resulting in runtime 500 errors.
  • Liveness Decoupling (backend/openshift.deploy.yml): Swapped the livenessProbe target from /api/health (database-dependent) to /api (in-memory greeting). The pod will no longer restart itself to death during transient database outages.
  • Placeholder Cleanup (backend/src/app.service.ts, specs, and E2E): Replaced the generic placeholder greeting 'Hello Backend!' with 'Backend is live!'.

Database (common/openshift.database.yml)

  • Lightweight Probing: Replaced the high-overhead psql -c 'SELECT 1' shell-out probes with native pg_isready execution, reducing resource consumption during routine checks.

Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

Copilot AI review requested due to automatic review settings June 12, 2026 05:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the reusable CI E2E workflow to wait for the dynamically deployed frontend route to become reachable/healthy before starting Playwright runs, reducing flakiness/timeouts (notably Chromium) caused by route propagation delays.

Changes:

  • Add a “Wait for frontend health check” step that polls the PR frontend URL until it returns HTTP 200 (or times out).
  • Run Playwright E2E tests only after the frontend endpoint is confirmed available.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DerekRoberts DerekRoberts changed the title ci(e2e): wait for frontend health check before E2E tests feat(deploy): orchestrate frontend readiness, optimize probes, and fix PrismaPg Jun 12, 2026
@DerekRoberts DerekRoberts self-assigned this Jun 12, 2026
@DerekRoberts DerekRoberts changed the title feat(deploy): orchestrate frontend readiness, optimize probes, and fix PrismaPg fix: PrismaPg, plus template probe and readiness improvements Jun 12, 2026
@DerekRoberts DerekRoberts changed the title fix: PrismaPg, plus template probe and readiness improvements feat(deploy): orchestrate frontend readiness, optimize probes, and fix PrismaPg Jun 12, 2026
@DerekRoberts DerekRoberts changed the title feat(deploy): orchestrate frontend readiness, optimize probes, and fix PrismaPg feat(deploy): orchestrate deployment readiness, decouple backend liveness, and fix PrismaPg Jun 12, 2026
@DerekRoberts DerekRoberts merged commit 5b7d06c into main Jun 12, 2026
31 checks passed
@DerekRoberts DerekRoberts deleted the feat/e2e-healthcheck-sync branch June 12, 2026 16:34
@github-project-automation github-project-automation Bot moved this from New to Done in DevOps (NR) Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants