Skip to content

fix(parser): fix error logging import - #17722

Closed
Aeovy wants to merge 2 commits into
infiniflow:mainfrom
Aeovy:aeovy/fix-error-import
Closed

Aeovy wants to merge 2 commits into
infiniflow:mainfrom
Aeovy:aeovy/fix-error-import

Conversation

@Aeovy

@Aeovy Aeovy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes an import error that prevents rag.flow.parser.parser from loading because LiteLLM does not expose logging as an importable module, it's a bool value.

This PR replaces the invalid LiteLLM import with Python's standard-library logging module, which already provides the logging methods used by the parser.

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🌈 python Pull requests that update Python code 🐞 bug Something isn't working, pull request that fix bug. labels Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0ca4794f-b6c6-4c74-a515-59d9b4890780

📥 Commits

Reviewing files that changed from the base of the PR and between d82c48e and 83abcda.

📒 Files selected for processing (1)
  • rag/flow/parser/parser.py

📝 Walkthrough

Walkthrough

The parser now imports Python’s standard-library logging module instead of litellm.logging.

Changes

Parser Logging

Layer / File(s) Summary
Replace parser logging import
rag/flow/parser/parser.py
The parser uses the standard-library logging module.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

A rabbit checks the parser line,
And finds the standard logger fine.
No borrowed logging calls remain,
Clean imports hop across the plain.
Thump, thump—logs run clear again!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the parser logging import fix, which is the main change in the pull request.
Description check ✅ Passed The description includes the required Summary section and clearly explains the import error and its standard-library logging fix.
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.

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.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

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

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

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

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@JinHai-CN

Copy link
Copy Markdown
Member

The issue is already fixed.

@JinHai-CN JinHai-CN closed this Aug 19, 2026
@Aeovy
Aeovy deleted the aeovy/fix-error-import branch August 19, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration 🌈 python Pull requests that update Python code 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