Add fast integration tests workflow for CI - #188
Conversation
Create a new GitHub Actions workflow that starts the full OpenRAG stack and verifies /health_check responds. Targets under 5 minutes runtime (vs 45-75 min for smoke_test) by: - Using official pre-built vLLM CPU image from AWS ECR - Pre-pulling all Docker images in parallel - Using aggressive health check timeouts (5s vs 30s intervals) - Caching HuggingFace models - Only testing health check endpoint (no document indexing) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughAdds a GitHub Actions "Integration Tests" workflow and accompanying environment file to spin up a Docker Compose full-stack test environment (OpenRAG, vLLM, Milvus, etcd, MinIO, PostgreSQL), run health checks, validate the RAG API endpoint, gather diagnostics on failure, and clean up resources. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant GH Actions as "GitHub Actions"
participant GHCR as "GHCR (registry)"
participant Runner as "Self-hosted / GitHub Runner"
participant Docker as "Docker Engine"
participant Compose as "docker-compose (integration override)"
participant Services as "OpenRAG / vLLM / Milvus / etcd / MinIO / Postgres"
Note over GH Actions,Runner: Workflow start (push/PR/workflow_dispatch)
GH Actions->>GHCR: Authenticate (ghcr login)
GH Actions->>Runner: dispatch job
Runner->>GHCR: pre-pull images (parallel)
Runner->>Docker: create docker-compose.integration.yaml
Runner->>Docker: docker compose up --profile cpu -d
Docker->>Compose: start defined services
Compose->>Services: bring containers up with health checks
loop Poll until healthy / timeout
Runner->>Services: GET /health
Services-->>Runner: health response ("RAG API is up") or error
end
alt healthy
Runner->>GH Actions: success
else failure
Runner->>Docker: docker compose ps, logs, inspect -> collect diagnostics
Runner->>Docker: docker compose down -v
Runner->>GH Actions: fail with diagnostics
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/integration_tests.yaml (1)
9-13: Consider filtering PR branches to avoid redundant runs.The
pull_request:trigger without abranches:filter will run on PRs targeting any branch. If you only want integration tests for PRs targetingmainordev, add a filter:🔎 Suggested change
on: push: branches: [main, dev] - pull_request: + pull_request: + branches: [main, dev] workflow_dispatch:
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/integration_tests.yaml.github/workflows/integration_tests/.env
🧰 Additional context used
🪛 dotenv-linter (4.0.0)
.github/workflows/integration_tests/.env
[warning] 4-4: [UnorderedKey] The API_KEY key should go before the BASE_URL key
(UnorderedKey)
[warning] 9-9: [UnorderedKey] The VLM_API_KEY key should go before the VLM_BASE_URL key
(UnorderedKey)
[warning] 14-14: [UnorderedKey] The EMBEDDER_BASE_URL key should go before the EMBEDDER_MODEL_NAME key
(UnorderedKey)
[warning] 28-28: [UnorderedKey] The RAY_MAX_TASKS_PER_WORKER key should go before the RAY_POOL_SIZE key
(UnorderedKey)
[warning] 33-33: [LowercaseKey] The RAY_task_retry_delay_ms key should be in uppercase
(LowercaseKey)
[warning] 34-34: [UnorderedKey] The RAY_ENABLE_UV_RUN_RUNTIME_ENV key should go before the RAY_task_retry_delay_ms key
(UnorderedKey)
[warning] 35-35: [LowercaseKey] The RAY_memory_monitor_refresh_ms key should be in uppercase
(LowercaseKey)
[warning] 35-35: [UnorderedKey] The RAY_memory_monitor_refresh_ms key should go before the RAY_task_retry_delay_ms key
(UnorderedKey)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: index-backup-restore
🔇 Additional comments (6)
.github/workflows/integration_tests.yaml (5)
45-56: Good optimization with parallel image pulls.Backgrounding the pulls and using
waitis an effective way to parallelize and reduce startup time.
89-94: Health check configuration is well-tuned for CI.The aggressive polling (5s interval, 30s start_period, 30 retries) balances fast feedback with reasonable tolerance for slow container startup.
195-208: Health check polling logic looks solid.The 180s timeout with status updates provides good observability while waiting. The
curl -sfflags correctly handle silent failures.
211-220: Health check verification is straightforward and effective.The substring match and informative failure message are appropriate for this validation.
241-245: Cleanup step is correctly configured.Using
if: always()ensures resources are cleaned up regardless of test outcome, and|| trueprevents cleanup failures from masking the actual test result..github/workflows/integration_tests/.env (1)
1-35: Environment file is appropriate for integration testing.The configuration is well-organized with clear comments explaining each section. Placeholder API keys (
sk-) are acceptable since this is only used for health check verification and actual LLM/VLM endpoints are not exercised.The Ray environment variables (
RAY_task_retry_delay_ms,RAY_memory_monitor_refresh_ms) use the correct case-sensitive naming convention expected by Ray and are properly formatted.
| - name: Create required directories | ||
| run: | | ||
| mkdir -p model_weights data db logs .hydra_config | ||
| cp -r .hydra_config/* .hydra_config/ 2>/dev/null || true |
There was a problem hiding this comment.
Self-copy command is a no-op.
Line 185 copies .hydra_config/* into .hydra_config/, which copies a directory's contents into itself—this does nothing. If the intent was to copy from a source location (e.g., a template directory), the source path needs correction. Otherwise, remove this line.
🔎 Suggested fix (if the line is unnecessary)
- name: Create required directories
run: |
mkdir -p model_weights data db logs .hydra_config
- cp -r .hydra_config/* .hydra_config/ 2>/dev/null || true🤖 Prompt for AI Agents
.github/workflows/integration_tests.yaml around lines 182 to 185: the cp command
copies `.hydra_config/*` into the same `.hydra_config/` directory (a no-op);
either remove that cp line entirely, or change the source to the actual
template/source directory you intended to copy from (e.g., replace
`.hydra_config/*` with the correct path like `config_templates/.hydra_config/*`
or similar), and keep the `2>/dev/null || true` behavior if you want to ignore
missing sources.
Remove 'include' directive that was causing conflicts with service overrides. Define all services (etcd, minio, milvus) directly in the compose file with fast health check settings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use GitHub Actions env vars for image names instead of hardcoded values. Changed heredoc from 'EOF' to EOF to enable variable expansion. Tested locally - health check returns "RAG API is up." successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The AWS ECR vLLM CPU image requires AVX512 which GitHub Actions runners don't have. Switch to openeuler/vllm-cpu:latest which works on standard runners. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The vLLM CPU backend requires NUMA memory policy access which fails without additional container capabilities. Add SYS_NICE, SYS_PTRACE caps and seccomp:unconfined to allow numa_migrate_pages syscall. Tested locally - vLLM starts and health check passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
a1fcf8c to
b545c5d
Compare
- Build image from source with Docker Buildx + GHA cache - Pull dependency images in parallel while building - Replace vLLM CPU with mock embedder (vLLM requires AVX512) - Mock embedder responds to /health, /v1/models, /v1/embeddings - Fix healthcheck to use Python urllib (no curl in slim image) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
No longer relevant #194 |
Summary
integration_tests.yamlGitHub Actions workflow that starts the full OpenRAG stack and verifies/health_checkrespondssmoke_test)Key optimizations
v0.9.2)Files added
.github/workflows/integration_tests.yaml- Main workflow.github/workflows/integration_tests/.env- Minimal config for health checkTest plan
/health_checkendpoint responds correctly🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.