Skip to content

fix(ci): pin Qdrant image, upgrade health-check to HTTP probe, fix deprecated Codecov action#26

Merged
vineethwilson15 merged 4 commits intomasterfrom
fix/qdrant-healthcheck-no-curl
Mar 7, 2026
Merged

fix(ci): pin Qdrant image, upgrade health-check to HTTP probe, fix deprecated Codecov action#26
vineethwilson15 merged 4 commits intomasterfrom
fix/qdrant-healthcheck-no-curl

Conversation

@vineethwilson15
Copy link
Owner

@vineethwilson15 vineethwilson15 commented Mar 7, 2026

Follow-up to #25 addressing all CodeRabbit review comments.

Changes

1. Pin Qdrant image to v1.17.0

qdrant/qdrant:latest is unpinned — future base image changes could silently break the health check or integration tests. Pinned to the version validated by #25 to match Neo4j's pinning strategy.

2. Upgrade health-check from bare TCP to HTTP /healthz probe

The previous bare TCP check marks the container healthy as soon as the port accepts connections, which can happen before Qdrant's HTTP server is fully serving. Replaced with a proper HTTP probe over bash TCP:

bash -ec 'exec 3<>/dev/tcp/127.0.0.1/6333 && printf "GET /healthz HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n" >&3 && read -r status <&3 && [[ $status == *" 200 "* ]]'

This validates a real HTTP 200 from /healthz — same strictness as the old curl probe, no external tooling needed.

3. Fix deprecated codecov/test-results-action@v1

CI logs warned this action is deprecated. Replaced with codecov/codecov-action@v5 using report_type: test_results as recommended.

4. Guard integration test step against empty directory

When tests/integration/ has no test_*.py files, pytest exits with code 4 (no tests collected), failing the job. Added a find guard to skip gracefully until integration tests are written.

5. Add Git branch discipline rules to copilot instructions

Documented the branching workflow in .github/copilot-instructions.md so AI agents and contributors always create a feature branch before making any commits, never pushing directly to master.

Testing

Add the run-integration label to trigger the integration tests job.

Summary by CodeRabbit

  • Chores
    • Improved CI reliability with more robust service readiness checks and a new wait-for-services step before integration tests.
    • Conditional skipping of integration tests when no tests are present.
    • Updated test reporting/upload mechanism for clearer results.
    • Added Git workflow guidelines covering branch and PR discipline (note: the section was inserted twice in the docs).

@coderabbitai
Copy link

coderabbitai bot commented Mar 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1eec702d-017e-40fa-9ce6-a2d3762af7d9

📥 Commits

Reviewing files that changed from the base of the PR and between d3f9992 and ef8b3de.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Walkthrough

Pins Qdrant to v1.17.0, replaces Codecov action with v5 and test-results reporting, adds a GitHub Actions step that polls Neo4j and Qdrant readiness and conditionally skips integration tests when none exist, and inserts a duplicated Git workflow section into copilot instructions.

Changes

Cohort / File(s) Summary
Documentation
\.github/copilot-instructions.md
Adds a "Git Workflow — Branch Discipline" section (branch naming, PR rules, post-merge sync). The content is inserted twice (duplication).
CI Workflow Configuration
\.github/workflows/ci.yml
Pins Qdrant image to v1.17.0; replaces codecov/test-results-action@v1 with codecov/codecov-action@v5 and uploads ./junit.xml as report_type: test_results; adds a "Wait for services" step that polls Neo4j (7687) and Qdrant (6333) readiness (TCP); removes legacy health-check options; conditionally skips integration tests when no test_*.py are present.

Sequence Diagram(s)

sequenceDiagram
  participant Runner as "GH Actions Runner"
  participant Neo4j as "Neo4j (docker)"
  participant Qdrant as "Qdrant (docker)"
  participant Tests as "pytest"
  participant Codecov as "Codecov Action"

  rect rgba(200,200,255,0.5)
  Runner->>Neo4j: poll TCP readiness (port 7687)
  Runner->>Qdrant: poll TCP readiness (port 6333)
  end

  alt services ready
    Runner->>Tests: run integration tests (pytest)
    alt tests found
      Tests-->>Runner: produce ./junit.xml
      Runner->>Codecov: upload ./junit.xml (report_type: test_results) via codecov/codecov-action@v5
    else no tests
      Tests-->>Runner: skip (no test_*.py)
    end
  else services timeout
    Runner-->>Runner: fail workflow / abort tests
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main CI fixes: Qdrant image pinning, health-check upgrade, and Codecov action fix, all of which are core changes in the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/qdrant-healthcheck-no-curl

Comment @coderabbitai help to get the list of available commands and usage tips.

Vineeth Wilson added 2 commits March 7, 2026 17:36
- Pin qdrant image from 'latest' to 'v1.17.0' for reproducibility
- Upgrade health-check from bare TCP to HTTP /healthz probe via bash TCP
  so the job waits for Qdrant to be fully serving, not just port-open
- Replace deprecated codecov/test-results-action@v1 with
  codecov/codecov-action@v5 using report_type: test_results
- Guard integration test step: skip gracefully when no test_*.py files
  exist yet (avoids pytest exit code 4 on empty directory)
@vineethwilson15 vineethwilson15 force-pushed the fix/qdrant-healthcheck-no-curl branch from 04c5089 to 0f4cc6e Compare March 7, 2026 12:06
@vineethwilson15 vineethwilson15 enabled auto-merge (squash) March 7, 2026 12:06
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/copilot-instructions.md:
- Around line 85-88: Update the instruction that currently shows "git checkout
master && git reset --hard origin/master" to fetch remote refs first;
specifically insert a fetch (e.g., run "git fetch origin" or "git fetch --all
--prune") before the reset so the sequence becomes fetch then checkout/reset,
ensuring "git reset --hard origin/master" uses up-to-date remote-tracking refs;
reference the existing command text "git checkout master && git reset --hard
origin/master" when making the change.

In @.github/workflows/ci.yml:
- Line 112: The current health-cmd uses /dev/tcp redirection which fails in the
Qdrant image; replace that expression with a simple HTTP probe using curl (or
nc) so the container health check works reliably. Update the health-cmd entry
(the string after --health-cmd) to run a POSIX shell one-liner that calls curl
-sSf http://127.0.0.1:6333/healthz (or uses nc to test TCP + an HTTP GET) and
exits non‑zero on failure, ensuring the CI job's health check for the qdrant
service succeeds.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6a2dcf8e-955b-4e77-9f6b-95dd20943d50

📥 Commits

Reviewing files that changed from the base of the PR and between 3893521 and 04c5089.

📒 Files selected for processing (2)
  • .github/copilot-instructions.md
  • .github/workflows/ci.yml

… add runner-side wait step

qdrant/qdrant:v1.17.0 (debian:bookworm-slim) ships no curl, wget, or nc,
and Debian's bash does not compile with --enable-net-redirections so
/dev/tcp is also unavailable. Any --health-cmd inside the container fails.

Fix: remove --health-cmd from the qdrant service block entirely and add a
'Wait for services' step in the job where the ubuntu-latest runner's own
curl polls http://localhost:6333/healthz until Qdrant is fully up.
Neo4j health-check is unaffected (cypher-shell is in that image).

Also add 'git fetch origin' before reset in copilot-instructions as
requested by CodeRabbit.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 125-136: Replace the failing "Wait for services" step that calls
cypher-shell with a pure bash TCP check against Neo4j's BOLT port (7687) using
/dev/tcp and add a proper timeout (e.g., 60s) and non-zero exit if it never
becomes available; keep the Qdrant check against http://localhost:6333/healthz
but add a similar timeout and exit-on-failure behavior so the workflow fails
fast if either service doesn't start. Specifically, remove the cypher-shell
invocation and use a loop that attempts /dev/tcp localhost 7687, breaking on
success, and another loop that curls /healthz with -sf and a timeout, and if
either loop exhausts retries, print a clear error and exit 1.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2986af67-b237-4e6d-bf10-1e9fd3a64065

📥 Commits

Reviewing files that changed from the base of the PR and between 0f4cc6e and d3f9992.

📒 Files selected for processing (2)
  • .github/copilot-instructions.md
  • .github/workflows/ci.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/copilot-instructions.md

…iness

cypher-shell is not installed on ubuntu-latest runners so the wait step
was failing immediately. Use bash built-in /dev/tcp to probe the bolt
port (7687) instead — works on ubuntu-latest without any external tools.

Also add explicit failure exits for both Neo4j and Qdrant if they do not
become ready within 60 s, surfacing the real cause instead of continuing
silently into a broken integration run.
@vineethwilson15 vineethwilson15 merged commit 997ec98 into master Mar 7, 2026
10 of 11 checks passed
@vineethwilson15 vineethwilson15 deleted the fix/qdrant-healthcheck-no-curl branch March 7, 2026 15:05
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.

1 participant