You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reject invalid parsers before starting batch reparsing - #22936
Reject retired built-in parser IDs when creating or updating datasets.
Validate every eligible document's parser before starting a batch reparse. An invalid parser later in the batch cannot clear earlier documents' chunks or replace their ingestion tasks.
Document how to reconfigure existing datasets and documents that use the retired parser.
Validation
Ran the chunk, document, and dataset Go unit tests with CGO disabled.
Regression tests cover an invalid parser after a valid document in the batch and verify the existing counters and completed task survive.
No actionable comments were generated in the recent review.
Walkthrough
Dataset writes and parse entry points reject the retired knowledge_graph parser ID. Document parser validation runs before parsing or clearing prior parse state. Regression tests verify rejection and state preservation.
Changes: Retired parser validation
Layer / File(s)
Summary
Dataset parser resolution and migration guidance internal/service/dataset/helpers.go, internal/service/dataset/create_test.go, docs/administrator/upgrade_and_migration/upgrade_from_v0_to_v1.md
Dataset parser IDs now follow builtin registry lookup, and create or update rejects the retired knowledge_graph parser. The upgrade guide explains how to select a supported parser and configure knowledge graph compilation separately.
ValidateDocumentParser accepts documents with a non-empty PipelineID; otherwise, it checks the trimmed parser ID against the default registry. Document and chunk parse paths reject invalid parser IDs before starting parsing or clearing prior state. Tests verify rejection and preservation of existing data and tasks.
infiniflow/ragflow#22188 — The issue describes acceptance of the retired parser ID and parse failures after existing chunks are deleted; this PR adds rejection and pre-parse validation.
Possibly related PRs
infiniflow/ragflow#22935 — The PR is the parent change and overlaps in parser rejection and pre-parse validation.
This change rejects the retired knowledge_graph parser when datasets are created or updated and before batch reparsing starts. A bad parser later in a batch can no longer clear earlier documents' chunks or replace their ingestion tasks. No concrete merge-blocking risk was found, and regression tests cover the new behavior.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "Reject invalid parsers before starting batch reparsing" matches the main change. The PR rejects retired parser IDs during dataset writes and validates each document's parser before a batch …
Description check
The description follows the repository template's intent. It has a Changes section and a Validation section, and it explains the background with a reference to #22188 and the split from #22935. The te…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "Reject invalid parsers before starting batch reparsing" matches the main change. The PR rejects retired parser IDs during dataset writes and validates each document's parser before a batch reparse starts, so an invalid parser cannot clear earlier documents' chunks. The title is short, specific, and uses the actual terms from the changeset.
Full details: Description check
Explanation
The description follows the repository template's intent. It has a Changes section and a Validation section, and it explains the background with a reference to #22188 and the split from #22935. The template calls for a Summary heading, and the description does not include one. Its opening lines (Refs #22188, Split from #22935) carry the purpose, so the content is mostly complete.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
A rabbit checks each parser’s name Before the chunks begin their game If knowledge_graph is in the queue The parse stops before state is new Old tasks and counters stay in place Then hops away at a steady pace
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 1b6602bb-2680-480c-ac1b-aad779940d9e
Commits
Reviewing files that changed from the base of the PR and between 70ed4c9 and 181be36.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #22188. Split from #22935.
Changes
Validation