feat(deploy): orchestrate deployment readiness, decouple backend liveness, and fix PrismaPg#2762
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)wait-for-backendinitContainerto hold the frontend rollout until the backend's/api/healthendpoint responds with success. This cleanly prevents the frontend from starting up when the backend is not yet ready to serve requests.3001(health) and switched startup, readiness, and liveness probes to query/healthon that port, bypassing the Coraza WAF middleware and avoiding log clutter.Backend
backend/src/prisma.service.ts): Passed{ schema: DB_SCHEMA }to thePrismaPgdriver adapter. Previously, the custom Postgres schema was ignored because thepgPool wrapper does not parse connection string query parameters, resulting in runtime 500 errors.backend/openshift.deploy.yml): Swapped thelivenessProbetarget from/api/health(database-dependent) to/api(in-memory greeting). The pod will no longer restart itself to death during transient database outages.backend/src/app.service.ts, specs, and E2E): Replaced the generic placeholder greeting'Hello Backend!'with'Backend is live!'.Database (
common/openshift.database.yml)psql -c 'SELECT 1'shell-out probes with nativepg_isreadyexecution, 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: