Skip to content

Fix: add file convert backward compatibility - #14583

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
buua436:b032
May 6, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
buua436:b032

Conversation

@buua436

@buua436 buua436 commented May 6, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

add file convert backward compatibility

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@coderabbitai

coderabbitai Bot commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 644982d7-837c-4f04-a8c1-1968daa986e0

📥 Commits

Reviewing files that changed from the base of the PR and between 406b36a and 161f99c.

📒 Files selected for processing (2)
  • api/apps/backward_compat.py
  • docs/references/http_api_reference.md

📝 Walkthrough

Walkthrough

This PR adds backward-compatibility support for a deprecated API endpoint by introducing a new route /api/v1/file/convert that forwards requests to the updated file2document_api.convert() endpoint, along with deprecation logging and user-facing documentation.

Changes

Deprecated Endpoint Forwarding

Layer / File(s) Summary
Core Implementation
api/apps/backward_compat.py
Added @manager.route("/file/convert", methods=["POST"]) handler deprecated_file_convert() that logs deprecation and forwards to file2document_api.convert(). Imported file2document_api and updated the deprecation mapping docstring.
Documentation
docs/references/http_api_reference.md
Added deprecation notice under "Links files to datasets and convert to documents" section, informing users that POST /api/v1/file/convert is deprecated in favor of the current endpoint.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A hop back in time, with grace and care,
Old paths still work, now leading there,
Deprecated routes, yet not left bare,
Forwarding requests, a kind affair! 🔀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is incomplete. While it includes the required sections (problem statement and type of change), the problem statement lacks detail and context about what backward compatibility issue is being solved. Expand the 'What problem does this PR solve?' section to provide background context about why this backward compatibility is needed and what endpoint migration prompted this change.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix: add file convert backward compatibility' clearly and specifically describes the main change—adding backward compatibility for the file convert endpoint.
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.

@buua436 buua436 added the ci Continue Integration label May 6, 2026
@buua436
buua436 marked this pull request as ready for review May 6, 2026 06:29
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels May 6, 2026
@codecov

codecov Bot commented May 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.16%. Comparing base (c0fc8b3) to head (161f99c).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14583   +/-   ##
=======================================
  Coverage   94.16%   94.16%           
=======================================
  Files          10       10           
  Lines         703      703           
  Branches      112      112           
=======================================
  Hits          662      662           
  Misses         25       25           
  Partials       16       16           

☔ View full report in Codecov by Sentry.
📢 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.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label May 6, 2026
@wangq8
wangq8 merged commit a190a6d into infiniflow:main May 6, 2026
1 check passed
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 lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants