Skip to content

CI: modify testcase to p3 - #17047

Merged
JinHai-CN merged 1 commit into
infiniflow:mainfrom
myf-bee:ragflow-move-pytestcase
Jul 17, 2026
Merged

JinHai-CN merged 1 commit into
infiniflow:mainfrom
myf-bee:ragflow-move-pytestcase

Conversation

@myf-bee

@myf-bee myf-bee commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

CI: modify longtime testcase to p3

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 17, 2026
@myf-bee myf-bee added the ci Continue Integration label Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request changes pytest priority markers from p1 or p2 to p3 across REST API and SDK test suites. Test implementations, inputs, assertions, and control flow remain unchanged.

Changes

Pytest priority updates

Layer / File(s) Summary
REST resource test markers
test/testcases/restful_api/test_chats.py, test_chunks.py, test_datasets.py, test_documents.py
Selected chat, chunk, dataset, and document tests are reclassified as p3.
REST retrieval and messaging markers
test/testcases/restful_api/test_retrieval.py, test_message_routes_unit.py, test_sessions.py
Selected retrieval, message-route, and session tests are reclassified as p3.
SDK assistant and chunk markers
test/testcases/test_sdk_api/test_chat_assistant_management/*, test_chunk_management_within_dataset/*, test_file_management_within_dataset/*
Selected assistant, chunk, and document-parsing tests are reclassified as p3.
SDK message and session markers
test/testcases/test_sdk_api/test_message_management/*, test_session_management/*
Selected message and session tests are reclassified as p3.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: python

Suggested reviewers: wangq8

Poem

I’m a rabbit with markers to spare,
Turning p1 and p2 into p3 with care.
No assertions hop, no test bodies bend,
Just quieter priorities from beginning to end.
🐇 pytest burrows onward again!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the main change: moving test cases to p3 for CI prioritization.
Description check ✅ Passed The description includes the required Summary section and gives the PR's purpose, though briefly.
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.

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.

@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)
test/testcases/test_sdk_api/test_session_management/test_delete_sessions_with_chat_assistant.py (1)

28-28: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Resolve the Ruff RUF005 warning on this touched line.

The p1→p3 change is correct, but the list concatenation still triggers Ruff. Prefer iterable unpacking:

Suggested fix
-            pytest.param(lambda r: {"ids": r[:1] + ["invalid_id"] + r[1:5]}, marks=pytest.mark.p3),
+            pytest.param(lambda r: {"ids": [*r[:1], "invalid_id", *r[1:5]]}, marks=pytest.mark.p3),
🤖 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
`@test/testcases/test_sdk_api/test_session_management/test_delete_sessions_with_chat_assistant.py`
at line 28, Update the lambda in the pytest.param case to construct the ids list
using iterable unpacking instead of list concatenation, while preserving the
existing placement of "invalid_id" between r[:1] and r[1:5] and retaining the p3
mark.

Source: Linters/SAST tools

🤖 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
`@test/testcases/test_sdk_api/test_session_management/test_delete_sessions_with_chat_assistant.py`:
- Line 28: Update the lambda in the pytest.param case to construct the ids list
using iterable unpacking instead of list concatenation, while preserving the
existing placement of "invalid_id" between r[:1] and r[1:5] and retaining the p3
mark.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 033a210a-116a-45a4-8bb6-dc011deee693

📥 Commits

Reviewing files that changed from the base of the PR and between 6a1224b and 6968273.

📒 Files selected for processing (25)
  • test/testcases/restful_api/test_chats.py
  • test/testcases/restful_api/test_chunks.py
  • test/testcases/restful_api/test_datasets.py
  • test/testcases/restful_api/test_documents.py
  • test/testcases/restful_api/test_message_routes_unit.py
  • test/testcases/restful_api/test_retrieval.py
  • test/testcases/restful_api/test_sessions.py
  • test/testcases/test_sdk_api/test_chat_assistant_management/test_create_chat_assistant.py
  • test/testcases/test_sdk_api/test_chat_assistant_management/test_delete_chat_assistants.py
  • test/testcases/test_sdk_api/test_chat_assistant_management/test_list_chat_assistants.py
  • test/testcases/test_sdk_api/test_chat_assistant_management/test_update_chat_assistant.py
  • test/testcases/test_sdk_api/test_chunk_management_within_dataset/test_add_chunk.py
  • test/testcases/test_sdk_api/test_chunk_management_within_dataset/test_delete_chunks.py
  • test/testcases/test_sdk_api/test_chunk_management_within_dataset/test_list_chunks.py
  • test/testcases/test_sdk_api/test_chunk_management_within_dataset/test_retrieval_chunks.py
  • test/testcases/test_sdk_api/test_chunk_management_within_dataset/test_update_chunk.py
  • test/testcases/test_sdk_api/test_file_management_within_dataset/test_parse_documents.py
  • test/testcases/test_sdk_api/test_message_management/test_forget_message.py
  • test/testcases/test_sdk_api/test_message_management/test_get_recent_message.py
  • test/testcases/test_sdk_api/test_message_management/test_list_message.py
  • test/testcases/test_sdk_api/test_message_management/test_update_message_status.py
  • test/testcases/test_sdk_api/test_session_management/test_create_session_with_chat_assistant.py
  • test/testcases/test_sdk_api/test_session_management/test_delete_sessions_with_chat_assistant.py
  • test/testcases/test_sdk_api/test_session_management/test_list_sessions_with_chat_assistant.py
  • test/testcases/test_sdk_api/test_session_management/test_update_session_with_chat_assistant.py

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.65%. Comparing base (7c698f8) to head (6968273).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17047      +/-   ##
==========================================
- Coverage   94.56%   90.65%   -3.91%     
==========================================
  Files          10       10              
  Lines         717      717              
  Branches      118      118              
==========================================
- Hits          678      650      -28     
- Misses         25       39      +14     
- Partials       14       28      +14     

☔ 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.

@JinHai-CN
JinHai-CN merged commit 6cc30bc into infiniflow:main Jul 17, 2026
8 checks passed
@myf-bee
myf-bee deleted the ragflow-move-pytestcase branch August 5, 2026 05:53
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