Skip to content

fix: wait for clickhouse and postgres#443

Open
SgtPooki wants to merge 1 commit intomainfrom
fix/local-overlay
Open

fix: wait for clickhouse and postgres#443
SgtPooki wants to merge 1 commit intomainfrom
fix/local-overlay

Conversation

@SgtPooki
Copy link
Copy Markdown
Collaborator

@SgtPooki SgtPooki commented Apr 10, 2026

fix on top of #438 to ensure local cluster waits on postgres and clickhouse pods

Copilot AI review requested due to automatic review settings April 10, 2026 14:36
@FilOzzy FilOzzy added this to FOC Apr 10, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Apr 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 local Kustomize overlay to delay starting the backend and worker pods until their datastore dependencies are reachable, aiming to reduce crash loops during local boot.

Changes:

  • Adds a new backend patch to inject an initContainer that waits for Postgres and ClickHouse.
  • Adds a similar initContainer to the dealbot-worker Deployment.
  • Wires the new backend patch into the local overlay’s kustomization.yaml.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
kustomize/overlays/local/kustomization.yaml Adds the new backend startup-dependencies patch to the local overlay.
kustomize/overlays/local/dealbot-worker-deployment.yaml Adds an initContainer to wait for Postgres and ClickHouse before starting the worker.
kustomize/overlays/local/backend-startup-dependencies.yaml New strategic-merge patch to add an initContainer to the backend Deployment.

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

Comment on lines +20 to +23
until wget -qO- http://dealbot-clickhouse:8123/ping | grep -qx "Ok."; do
echo "waiting for ClickHouse"
sleep 2
done
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The initContainer waits on http://dealbot-clickhouse:8123/ping, but this repo doesn’t define any ClickHouse Deployment/Service (a repo-wide search for clickhouse only finds these new wait loops). As written, the initContainer will block startup forever in the local overlay. Either add the missing ClickHouse manifests/service to kustomize/overlays/local (and ensure the service name/port match), or remove/feature-flag the ClickHouse wait so local pods can start without it.

Suggested change
until wget -qO- http://dealbot-clickhouse:8123/ping | grep -qx "Ok."; do
echo "waiting for ClickHouse"
sleep 2
done

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +32
until wget -qO- http://dealbot-clickhouse:8123/ping | grep -qx "Ok."; do
echo "waiting for ClickHouse"
sleep 2
done
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

This initContainer blocks on dealbot-clickhouse:8123, but there is no ClickHouse Service/Deployment defined anywhere in the repository (a repo-wide search for clickhouse only finds these new lines). In the local overlay this will hang the worker pods indefinitely. Add ClickHouse manifests/service (matching the hostname/port) or remove/guard the ClickHouse wait.

Suggested change
until wget -qO- http://dealbot-clickhouse:8123/ping | grep -qx "Ok."; do
echo "waiting for ClickHouse"
sleep 2
done

Copilot uses AI. Check for mistakes.
@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC Apr 12, 2026
@BigLep BigLep requested a review from iand April 12, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 Awaiting review

Development

Successfully merging this pull request may close these issues.

4 participants