Repository navigation
Refactor: enahnce CI - #15147
Refactor: enahnce CI#15147
Conversation
📝 WalkthroughWalkthroughThe pull request updates ChangesService Readiness Wait Strategy
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/tests.yml:
- Around line 236-249: The readiness probe loop uses curl with --connect-timeout
5 which only limits the connect phase and can hang if the endpoint stalls;
update the curl invocation inside the loop that references RAGFLOW_CONTAINER,
HOST_ADDRESS and svc_ready to also include a per-attempt wall-clock timeout
(e.g. add --max-time 10) for all six probes (the occurrences around the shown
loop and the other five blocks referenced in the comment) so each curl call
cannot block indefinitely; also adjust the accompanying rg test to detect curl
calls that use --connect-timeout without a matching --max-time.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a1a598c7-c988-404b-9ad3-4f930ee2bfa2
📒 Files selected for processing (1)
.github/workflows/tests.yml
| svc_ready=0 | ||
| for i in $(seq 1 60); do | ||
| if sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/api/v1/system/ping > /dev/null 2>&1; then | ||
| svc_ready=1 | ||
| break | ||
| fi | ||
| echo "Waiting for service to be available... ($i/120)" | ||
| sleep 5 | ||
| done | ||
| if [ "$svc_ready" -ne 1 ]; then | ||
| echo "Service did not become ready after 5 minutes. Docker logs:" | ||
| sudo docker logs ${RAGFLOW_CONTAINER} | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Bounded loop can still hang because probe lacks total request timeout.
curl --connect-timeout 5 only limits connect phase. If the socket connects but the endpoint stalls, this call can block indefinitely and bypass your 60-iteration cap. Add --max-time to enforce per-attempt wall-clock timeout.
Suggested patch (apply to all six readiness probes)
- if sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 ${HOST_ADDRESS}/api/v1/system/ping > /dev/null 2>&1; then
+ if sudo docker exec ${RAGFLOW_CONTAINER} curl -s --connect-timeout 5 --max-time 5 ${HOST_ADDRESS}/api/v1/system/ping > /dev/null 2>&1; then#!/bin/bash
# Verify there are no readiness probes that use connect-timeout without max-time.
# Expected result: no output.
rg -nP 'curl\s+-s\s+--connect-timeout\s+5(?!\s+--max-time)' .github/workflows/tests.ymlAlso applies to: 256-269, 332-345, 450-463, 470-483, 546-559
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/tests.yml around lines 236 - 249, The readiness probe loop
uses curl with --connect-timeout 5 which only limits the connect phase and can
hang if the endpoint stalls; update the curl invocation inside the loop that
references RAGFLOW_CONTAINER, HOST_ADDRESS and svc_ready to also include a
per-attempt wall-clock timeout (e.g. add --max-time 10) for all six probes (the
occurrences around the shown loop and the other five blocks referenced in the
comment) so each curl call cannot block indefinitely; also adjust the
accompanying rg test to detect curl calls that use --connect-timeout without a
matching --max-time.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15147 +/- ##
=======================================
Coverage 93.12% 93.12%
=======================================
Files 10 10
Lines 713 713
Branches 116 116
=======================================
Hits 664 664
Misses 29 29
Partials 20 20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
What problem does this PR solve?
Refactor: enahnce CI
Type of change