Skip to content

Enhancement: optimize ci - #16130

Merged
asiroliu merged 2 commits into
infiniflow:mainfrom
6ba3i:fix/ci1
Jun 17, 2026
Merged

asiroliu merged 2 commits into
infiniflow:mainfrom
6ba3i:fix/ci1

Conversation

@6ba3i

@6ba3i 6ba3i commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

optimize ci by fixing flaky clean-ups and rendundant tasks

Type of change

  • Performance Improvement

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The 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 curl checks to fail-fast mode with quoted variables.

Changes

CI Workflow Hardening

Layer / File(s) Summary
Trigger expansion and disabled check step
.github/workflows/tests.yml
pull_request.types is expanded to include opened, synchronize, reopened, ready_for_review, and labeled. The "Check comments of changed Python files" step body is fully commented out.
Build script hardening and Python env step split
.github/workflows/tests.yml
"Build ragflow go server" gains set -euo pipefail, a cleanup_builder function, and a trap for Docker container cleanup. A dedicated "Prepare Python test environment" step is added for uv sync and editable SDK install; the previously inlined uv sync sequence is removed.
Service readiness checks hardened to curl -sf
.github/workflows/tests.yml
All six service readiness curl commands across Infinity and Elasticsearch test phases (SDK, RESTful API, CLI retrieval) are changed from curl -s to curl -sf and HOST_ADDRESS is quoted in the ping URL.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop hop, the workflow's tight,
With traps and strict modes set just right.
curl -sf won't silently fail,
Each env step now tells its tale.
The rabbit checks the CI light! ✅

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Enhancement: optimize ci' is vague and generic, using non-descriptive terms that don't convey meaningful information about the specific changes (workflow hardening, shell script improvements, test setup refactoring). Replace with a more specific title that captures the main improvements, such as 'Harden CI workflow with safer shell scripts and refactored test setup' or similar.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description includes the required template sections with a problem statement and type of change marked, though the problem description contains a typo ('rendundant' instead of 'redundant') and lacks specific details about which tasks are being optimized.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

❤️ Share

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

@6ba3i 6ba3i added the ci Continue Integration label Jun 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/tests.yml (1)

340-340: ⚡ Quick win

Quote RAGFLOW_CONTAINER for consistency with build step.

The build step properly quotes BUILDER_CONTAINER in all docker commands (lines 173, 179), but RAGFLOW_CONTAINER is unquoted here and in five other curl readiness checks (lines 360, 436, 556, 576, 652). While GITHUB_RUN_ID is 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; then

Apply 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

📥 Commits

Reviewing files that changed from the base of the PR and between b3ac03b and 48ed9ad.

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

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.16%. Comparing base (e456598) to head (48ed9ad).
⚠️ Report is 3 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asiroliu
asiroliu merged commit 44164e1 into infiniflow:main Jun 17, 2026
3 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jun 20, 2026
@6ba3i
6ba3i deleted the fix/ci1 branch September 22, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants