fix: tolerate SQL audit parse and empty input failures#3332
Merged
Conversation
Split parse-error and empty-node handling so intentional error swallowing is explicit for CI. Co-authored-by: Cursor <cursoragent@cursor.com>
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Seechi-Yolo
approved these changes
Jun 10, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
User description
Summary
Validation
Related issue: https://github.com/actiontech/sqle-ee/issues/2957
Description
针对空SQL输入增加提前返回判断
完善SQL解析及分段匹配逻辑
添加原始SQL回退及错误提示机制
扩展单元测试覆盖关键逻辑
Diagram Walkthrough
File Walkthrough
sql_audit_record.go
加强SQL文件解析与空值处理逻辑sqle/api/controller/v1/sql_audit_record.go
audit.go
优化审核任务错误回退与警告附加机制sqle/server/audit.go
sql_audit_record_test.go
增加SQL解析及回退机制的测试用例sqle/api/controller/v1/sql_audit_record_test.go
audit_degrade_test.go
增加审核降级回退与统计更新的测试验证sqle/server/audit_degrade_test.go
task.go
更新任务生成中的空输入处理及工具函数整合sqle/api/controller/v1/task.go