Repository navigation
Conversation
📝 WalkthroughWalkthrough
ChangesDataset parsing status
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 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 `@api/apps/services/dataset_api_service.py`:
- Around line 422-434: Expose the API contract’s unstarted_count and
failed_count fields instead of the internal unstart_count and fail_count keys.
In dataset_api_service.py lines 422-434, map both names in empty_status and when
merging parsing_status_by_kb; update
test/unit_test/api/apps/services/test_dataset_api_service_list.py lines 29 and
179-186 so _STATUS_FIELDS and output assertions use the corrected API keys.
🪄 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: 4a3a2a59-129d-447b-b3a0-821144fedd64
📒 Files selected for processing (2)
api/apps/services/dataset_api_service.pytest/unit_test/api/apps/services/test_dataset_api_service_list.py
|
Duplicated with #16913 |
Summary
Fixes #16855.
This PR wires
include_parsing_status=trueinto the dataset list service response. When requested, the service now batches parsing-status aggregation for returned datasets and merges zero-filled status counts into each item.Changes
include_parsing_statusrequest values.Tests
uv run python -m pytest test/unit_test/api/apps/services/test_dataset_api_service_list.py -quv run python -m pytest test/unit_test/api/db/services/test_document_service_get_parsing_status.py -quv run ruff check api/apps/services/dataset_api_service.py test/unit_test/api/apps/services/test_dataset_api_service_list.pygit diff --check