Repository navigation
Enhancement: optimize ci - #16130
Enhancement: optimize ci#16130
Conversation
📝 WalkthroughWalkthroughThe GitHub Actions test workflow is updated to trigger on additional PR event types, disable the "Check comments" step's logic, harden the Go server build step with strict shell mode and Docker cleanup trapping, split Python environment setup into its own step, and switch all service readiness ChangesCI Workflow Hardening
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 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.
🧹 Nitpick comments (1)
.github/workflows/tests.yml (1)
340-340: ⚡ Quick winQuote
RAGFLOW_CONTAINERfor consistency with build step.The build step properly quotes
BUILDER_CONTAINERin all docker commands (lines 173, 179), butRAGFLOW_CONTAINERis unquoted here and in five other curl readiness checks (lines 360, 436, 556, 576, 652). WhileGITHUB_RUN_IDis unlikely to contain special characters, quoting variables is a bash best practice and maintains consistency within this workflow.📋 Proposed fix for all six occurrences
- if sudo docker exec ${RAGFLOW_CONTAINER} curl -sf --connect-timeout 5 "${HOST_ADDRESS}/api/v1/system/ping" > /dev/null 2>&1; then + if sudo docker exec "${RAGFLOW_CONTAINER}" curl -sf --connect-timeout 5 "${HOST_ADDRESS}/api/v1/system/ping" > /dev/null 2>&1; thenApply the same quoting pattern to lines 360, 436, 556, 576, and 652.
🤖 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 at line 340, The RAGFLOW_CONTAINER variable is not quoted in the docker exec curl readiness check commands, which is inconsistent with how BUILDER_CONTAINER is quoted in the build step. Add quotes around all instances of ${RAGFLOW_CONTAINER} in the six curl readiness check conditions to change them from ${RAGFLOW_CONTAINER} to "${RAGFLOW_CONTAINER}". This applies to the curl commands that verify the service health by checking the /api/v1/system/ping endpoint in the readiness test sections.
🤖 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.
Nitpick comments:
In @.github/workflows/tests.yml:
- Line 340: The RAGFLOW_CONTAINER variable is not quoted in the docker exec curl
readiness check commands, which is inconsistent with how BUILDER_CONTAINER is
quoted in the build step. Add quotes around all instances of
${RAGFLOW_CONTAINER} in the six curl readiness check conditions to change them
from ${RAGFLOW_CONTAINER} to "${RAGFLOW_CONTAINER}". This applies to the curl
commands that verify the service health by checking the /api/v1/system/ping
endpoint in the readiness test sections.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fbd87e97-5424-4ff4-ad46-03160cf653fd
📒 Files selected for processing (1)
.github/workflows/tests.yml
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16130 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 668 668
Misses 29 29
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What problem does this PR solve?
optimize ci by fixing flaky clean-ups and rendundant tasks
Type of change