Skip to content

fix: require non-empty DB service password on add/update - #662

Merged
Seechi-Yolo merged 2 commits into
mainfrom
dev-sqle-ee-gbase-8a-datasource
Aug 12, 2026
Merged

fix: require non-empty DB service password on add/update#662
Seechi-Yolo merged 2 commits into
mainfrom
dev-sqle-ee-gbase-8a-datasource

Conversation

@LordofAvernus

@LordofAvernus LordofAvernus commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

关联的 issue

https://github.com/actiontech/sqle-ee/issues/3071

描述你的变更

  • Restore Add DBService password validate:"required" (reject empty password)
  • Update path rejects explicit empty string with password can't be empty
  • Unit tests cover empty-password rejected paths (v1/v2/biz)

确认项(pr提交后操作)

Tip

请在指定复审人之前,确认并完成以下事项,完成后✅


  • 我已完成自测
  • 我已记录完整日志方便进行诊断
  • 我已在关联的issue里补充了实现方案
  • 我已在关联的issue里补充了测试影响面
  • 我已确认了变更的兼容性,如果不兼容则在issue里标记 not_compatible
  • 我已确认了是否要更新文档,如果要更新则在issue里标记 need_update_doc

Align Add/Update validation with connectable empty-password
GBase-8a DSNs; keep other required fields and add unit coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit a13bcb1)

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

错误消息不一致

业务层更新测试对空密码的错误提示与添加测试中的提示不一致,可能导致使用方解析错误或出现混淆,建议统一错误提示以便一致性判断。

if !strings.Contains(err.Error(), "password can't be empty") {
	t.Fatalf("expected \"password can't be empty\", got: %v", err)
}

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

Revert empty-password allowance; restore Add validate required and reject empty Update password.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown

Persistent review updated to latest commit a13bcb1

@actiontech-bot actiontech-bot changed the title feat: allow empty DB service password on add/update fix: require non-empty DB service password on add/update Aug 11, 2026
@Seechi-Yolo
Seechi-Yolo merged commit 4916f46 into main Aug 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants