-
Notifications
You must be signed in to change notification settings - Fork 106
refactor: 将默认数据库驱动改为sqlite并移除无用代码 #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
移除HelmRepository.UpdateContent方法及相关迁移代码 更新air配置排除.env文件
Warning Rate limit exceeded@weibaohui has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 46 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
Walkthrough本次变更涉及 Air 配置新增 Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as 开发者
participant Air as Air 热重载
Dev->>Air: 保存 .env 文件
Air-->>Dev: 不触发重载(因已被 exclude)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 分钟 Poem
✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.air.toml (1)
10-10
: 建议同时排除 .env. 变体文件,避免开发时误触发重载*不少团队会使用 .env.local / .env.development 等文件,建议一并排除。
-exclude_file = ["*.test", ".env"] +exclude_file = ["*.test", ".env", ".env.*"]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.air.toml
(1 hunks).env.example
(1 hunks)pkg/models/helm_repository.go
(0 hunks)pkg/models/migrate.go
(1 hunks)
💤 Files with no reviewable changes (1)
- pkg/models/helm_repository.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (go)
🔇 Additional comments (3)
.env.example (1)
32-32
: 改为 sqlite 默认值与PR目标一致,变更合理默认DB切至sqlite与本次重构目标一致,便于开箱即用。
.air.toml (1)
10-10
: 本次调整方向正确忽略 .env 可避免开发过程因环境变量微调导致的频繁重编译,体验更稳定。
pkg/models/migrate.go (1)
59-62
: 确认已移除 HelmRepository.content 字段,且无 UpdateContent 方法或字段引用
– 在pkg/models/helm_repository.go
中,HelmRepository
结构体已不含Content
字段
– 全仓库搜索未发现UpdateContent
方法或对模型content
字段的任何调用或引用
可以安心保留迁移脚本中注释掉的老逻辑,无需额外修改。
@@ -29,7 +29,7 @@ NODE_SHELL_IMAGE=alpine:latest | |||
|
|||
|
|||
# 数据库类型(sqlite、mysql、postgresql等) | |||
DB_DRIVER=postgresql | |||
DB_DRIVER=sqlite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
建议补充 sqlite 并发与文件路径注意事项(WAL、busy_timeout、目录存在性)
为减少多并发写入“database is locked”等问题,建议:
- 在 README 或 .env.example 注释中提示开启 WAL 模式与 busy_timeout;
- 确保 ./data 目录在启动前已创建;
- 如代码侧支持参数化,提供一个可选的 DSN/PRAGMA 环境变量(例如 SQLITE_DSN 或 SQLITE_PARAMS)示例,包含 _journal_mode=WAL&busy_timeout=5000 等设置。
可选验证:确认代码是否已对 sqlite 进行 WAL/busy_timeout 配置。
🏁 Script executed:
#!/bin/bash
# 搜索项目内 sqlite 连接与参数设置位置,确认是否设置 WAL / busy_timeout 等
rg -n -A3 -B3 '(gorm\.Open|driver/sqlite|sqlite(_path|path|dsn|params|pragma|journal|busy_timeout))'
Length of output: 1091
补充 SQLite 并发与文件路径注意事项
在使用 DB_DRIVER=sqlite
时,建议在 .env.example
或 README
中补充以下说明,以降低多并发写入时出现 “database is locked” 的风险,并保证数据库文件路径正确:
- 在 DSN/PRAGMA 中开启 WAL 模式与设置写超时,例如:
# 示例 .env.example SQLITE_DSN="file:./data/app.db?_journal_mode=WAL&busy_timeout=5000"
- 启动前确保
./data
目录已创建,否则 SQLite 无法自动创建父目录。 - 如代码侧已支持参数化 DSN,可新增环境变量示例(如
SQLITE_DSN
或SQLITE_PARAMS
),并在internal/dao/conn.go
中使用:// internal/dao/conn.go db, err := gorm.Open(sqlite.Open(cfg.SqliteDsn), &gorm.Config{ Logger: customLogger })
- 当前代码片段(见
internal/dao/conn.go:74
)仅调用sqlite.Open(cfg.SqlitePath)
,尚未显式配置 WAL 和 busy_timeout,建议一并传入上述参数。
请根据项目需求,补充文档与示例,并在代码启动逻辑中校验或创建 data 目录。
🤖 Prompt for AI Agents
In the .env.example file at line 32, add documentation and examples for SQLite
usage to reduce "database is locked" errors under concurrent writes and ensure
correct file paths. Include a sample environment variable like SQLITE_DSN with
WAL mode and busy_timeout parameters, e.g.,
"file:./data/app.db?_journal_mode=WAL&busy_timeout=5000". Also, update the
README or .env.example to remind users to create the ./data directory before
starting. In internal/dao/conn.go around line 74, modify the SQLite connection
to use the new DSN parameter instead of just the file path, enabling WAL and
timeout settings. Add code to check and create the ./data directory at startup
if it doesn't exist.
// MYSQL 下需要单独处理 content字段为LONGTEXT,pg、sqlite不需要处理,这个字段删掉了,不用了 | ||
// if dao.DB().Migrator().HasTable(&HelmRepository{}) && dao.DB().Dialector.Name() == "mysql" { | ||
// dao.DB().Exec("ALTER TABLE helm_repositories MODIFY COLUMN content LONGTEXT") | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
建议用明确的数据迁移替换注释代码:在支持的驱动上删除已废弃的 content 列
既然 content 字段已废弃,建议在 MySQL/PostgreSQL 上显式清理历史列,减少“僵尸列”带来的维护成本与困惑。对于 SQLite,可跳过(或仅在 SQLite 3.35+ 时执行),以避免潜在不兼容。
可在当前位置替换为如下逻辑(沿用本函数 errs 聚合方式):
- // MYSQL 下需要单独处理 content字段为LONGTEXT,pg、sqlite不需要处理,这个字段删掉了,不用了
- // if dao.DB().Migrator().HasTable(&HelmRepository{}) && dao.DB().Dialector.Name() == "mysql" {
- // dao.DB().Exec("ALTER TABLE helm_repositories MODIFY COLUMN content LONGTEXT")
- // }
+ // 兼容历史库:content 字段已废弃,支持的驱动上清理历史列(避免遗留“僵尸列”)
+ if dao.DB().Migrator().HasTable(&HelmRepository{}) {
+ name := dao.DB().Dialector.Name()
+ if (name == "mysql" || name == "postgres") && dao.DB().Migrator().HasColumn(&HelmRepository{}, "content") {
+ if err := dao.DB().Migrator().DropColumn(&HelmRepository{}, "content"); err != nil {
+ errs = append(errs, err)
+ }
+ }
+ // 注意:SQLite 对 DropColumn 依赖 3.35+,如需支持可在此按版本/驱动差异化处理
+ }
🤖 Prompt for AI Agents
In pkg/models/migrate.go around lines 59 to 62, replace the commented-out code
with explicit migration logic that drops the deprecated content column on
supported databases like MySQL and PostgreSQL, while skipping or conditionally
handling SQLite based on version. Implement this using the existing errs
aggregation pattern in the function to properly track errors during the
migration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
internal/dao/conn.go (1)
66-71
: defer file.Close() 在错误检查前调用,err != nil 时可能触发空指针当
os.Create
返回错误时,file
为nil
,当前先defer file.Close()
会导致 panic。应当先判断错误,再 defer。- file, err := os.Create(cfg.SqlitePath) - defer file.Close() - if err != nil { + file, err := os.Create(cfg.SqlitePath) + if err != nil { klog.Errorf("创建数据库文件[%s]失败: %v", cfg.SqlitePath, err.Error()) return nil, err - } + } + defer file.Close()
🧹 Nitpick comments (1)
internal/dao/conn.go (1)
61-62
: 目录权限过宽,建议从 0777(os.ModePerm)收紧为 0755
os.ModePerm
等同 0777,过于宽松。一般目录使用 0755 更合适,降低误用风险。- err := os.MkdirAll(dir, os.ModePerm) + err := os.MkdirAll(dir, 0755)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/database.md
(3 hunks)internal/dao/conn.go
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
internal/dao/conn.go (1)
pkg/flag/flag.go (1)
Config
(21-90)
🪛 LanguageTool
docs/database.md
[uncategorized] ~48-~48: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:正确"地"读
Context: ...*: 启动前请确保数据库文件所在目录 (如 ./data
) 已存在且具有正确的读写权限。 2. 并发限制: SQLite 适合轻量级应用场景。如果您的...
(wb4)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (go)
🔇 Additional comments (3)
internal/dao/conn.go (1)
74-76
: DSN 参数写法无需使用下划线前缀
glebarez/sqlite
驱动会自动将busy_timeout
和journal_mode
查询参数映射为对应的 PRAGMA,所以无需改为_busy_timeout
或_pragma
,当前写法(busy_timeout=5000&journal_mode=WAL
)已经生效。如果想进一步优化并发,可在 DSN 中额外添加
cache=shared
,例如:- dsn := fmt.Sprintf("file:%s?_journal_mode=WAL&busy_timeout=5000", cfg.SqlitePath) + dsn := fmt.Sprintf("file:%s?cache=shared&busy_timeout=5000&journal_mode=WAL", cfg.SqlitePath)无需手动执行 PRAGMA。
Likely an incorrect or invalid review comment.
docs/database.md (2)
61-71
: MySQL 参数表格式化变更清晰可读,LGTM
93-102
: PostgreSQL 参数表格式化变更清晰可读,LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (2)
docs/database.md (2)
41-48
: DSN 示例参数名应为 _busy_timeout;可提供 _pragma 可选写法当前示例使用 busy_timeout,可能不生效;应改为 _busy_timeout,或使用 _pragma。与 go-sqlite3 的实践保持一致。
建议改为:
- SQLITE_DSN="file:./data/k8m.db?_journal_mode=WAL&busy_timeout=5000" + SQLITE_DSN="file:./data/k8m.db?cache=shared&_journal_mode=WAL&_busy_timeout=5000"- --sqlite-dsn="file:./data/k8m.db?_journal_mode=WAL&busy_timeout=5000" + --sqlite-dsn="file:./data/k8m.db?cache=shared&_journal_mode=WAL&_busy_timeout=5000"也可在示例旁补充:或使用
_pragma=journal_mode(WAL)&_pragma=busy_timeout(5000)
。
63-66
: WAL 模式下直接 cp 备份可能不一致,改用 sqlite3 .backup 或 VACUUM INTO在并发写入或 WAL 模式下,简单 cp 不能保证一致性快照,存在数据风险。
建议替换备份示例:
-3. **备份建议**: 建议定期备份数据库文件,可以通过以下命令进行备份: - ```shell - cp ./data/k8m.db ./data/k8m.db.backup - ``` +3. **备份建议**: 建议定期备份数据库文件,可使用以下任一方式获取一致性快照: + ```shell + # 方式一(推荐,通用) + sqlite3 ./data/k8m.db '.backup ./data/k8m.db.backup' + + # 方式二(新版本 SQLite 支持) + sqlite3 ./data/k8m.db 'VACUUM INTO "./data/k8m.db.backup"' + ```
🧹 Nitpick comments (2)
docs/database.md (2)
52-58
: 补充 cache=shared 建议,优化多连接并发读写体验在多连接/多进程下,启用 shared cache 更易配合 WAL。
建议将本小节改为三点:
1. WAL (Write-Ahead Logging) 模式 -2. busy_timeout 设置为 5000ms +2. busy_timeout 设置为 5000ms +3. 建议启用 cache=shared(例如 DSN 中追加 `cache=shared`),以改善多连接并发下的读写体验
61-61
: 措辞微调:将“具有正确的读写权限”改为“具备正确的读写权限”语义更顺滑,符合中文书面表达。
-1. **目录权限**: 启动前请确保数据库文件所在目录 (如 `./data`) 已存在且具有正确的读写权限。 +1. **目录权限**: 启动前请确保数据库文件所在目录 (如 `./data`) 已存在且具备正确的读写权限。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
docs/database.md
(2 hunks)internal/dao/conn.go
(1 hunks)pkg/flag/flag.go
(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- internal/dao/conn.go
🧰 Additional context used
🪛 LanguageTool
docs/database.md
[uncategorized] ~61-~61: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:正确"地"读
Context: ...*: 启动前请确保数据库文件所在目录 (如 ./data
) 已存在且具有正确的读写权限。 2. 并发限制: SQLite 适合轻量级应用场景。如果您的...
(wb4)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (go)
🔇 Additional comments (1)
pkg/flag/flag.go (1)
57-58
: 新增 SqliteDSN 字段设计合理,保持向后兼容新增字段不影响现有 SqlitePath,扩展性好。建议在帮助文案与运行时日志里明确“DSN 优先级高于 Path”。
defaultSqliteDSN := getEnv("SQLITE_DSN", "") // 默认为空,表示使用默认 DSN 配置 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
请核对连接实现中的 DSN 参数是否与文档一致(_journal_mode、_busy_timeout 或 _pragma)
避免“文档用法”和“实际实现”不一致导致 busy_timeout 未生效。
建议运行以下脚本,检查 internal/dao/conn.go 中的 DSN 写法与示例一致性:
🏁 Script executed:
#!/bin/bash
# 查找 sqlite DSN / PRAGMA 相关设置是否包含 _journal_mode / _busy_timeout 或 _pragma
rg -n -A3 -B3 'SQLITE_DSN|SqliteDSN|journal_mode|busy_timeout|_pragma' internal/dao/conn.go || true
Length of output: 394
核对 SQLite DSN 参数与文档一致
默认 DSN 使用了 ? _journal_mode=WAL &busy_timeout=5000
,但根据 Go SQLite 驱动(mattn/go-sqlite3/gorm.io/driver/sqlite)文档,busy_timeout
需带前导下划线(_busy_timeout
)或通过 _pragma
方式指定,否则可能导致超时设置不生效。
请在 internal/dao/conn.go
中调整:
- 将
busy_timeout=5000
改为_busy_timeout=5000
- (可选)可改用
_pragma=busy_timeout(5000)
格式以匹配文档示例
示例 diff:
- dsn = fmt.Sprintf("file:%s?_journal_mode=WAL&busy_timeout=5000", cfg.SqlitePath)
+ dsn = fmt.Sprintf("file:%s?_journal_mode=WAL&_busy_timeout=5000", cfg.SqlitePath)
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In pkg/flag/flag.go around lines 173 to 174, the default SQLite DSN parameter
`busy_timeout=5000` does not follow the Go SQLite driver documentation which
requires a leading underscore. Update the DSN string to use `_busy_timeout=5000`
instead of `busy_timeout=5000`. Optionally, you can use the
`_pragma=busy_timeout(5000)` format to align with the documented examples. Make
sure this change is reflected in internal/dao/conn.go where the DSN is
constructed or used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (2)
docs/database.md (2)
47-56
: 高级 DSN 示例已采用带下划线参数,修复了此前 busy_timeout 未生效的风险本段示例使用
_journal_mode
与_busy_timeout
,与驱动要求一致,已避免早先“缺少前导下划线导致不生效”的问题。与“_pragma”风格并列展示也可接受。
69-86
: 备份方法已改为 SQLite 原生命令并补充 WAL 注意事项,妥当
- 使用
.backup
与VACUUM INTO
,满足一致性备份要求。- 对 cp 的风险给出充分告警与步骤,实践上可接受。
- 措辞“具备正确的读写权限”已较为顺畅。
🧹 Nitpick comments (1)
docs/database.md (1)
57-61
: 更正“DNS”为“DSN”并消除裸链接(MD034);可补充统一风格说明
- 将“更多DNS参数”更正为“更多 DSN 参数”。
- 将裸链接改为 Markdown 链接,消除 MD034。
- 可在此处说明:可选使用“带下划线参数”或“_pragma”两种风格(二选一即可),以减少读者困惑。
建议改动如下:
- > - 更多DNS参数,请参考https://github.com/glebarez/go-sqlite?tab=readme-ov-file#connection-string-examples + > - 更多 DSN 参数,请参考 [glebarez/go-sqlite 文档](https://github.com/glebarez/go-sqlite?tab=readme-ov-file#connection-string-examples) + > - DSN 可使用“带下划线参数”(如 `_busy_timeout=5000&_journal_mode=WAL`)或 `_pragma` 形式(如 `_pragma=busy_timeout(5000)&_pragma=journal_mode(WAL)`),任选其一保持一致即可。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
docs/database.md
(3 hunks)internal/dao/conn.go
(1 hunks)pkg/flag/flag.go
(4 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- internal/dao/conn.go
- pkg/flag/flag.go
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
docs/database.md
7-7: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
61-61: Bare URL used
(MD034, no-bare-urls)
🪛 LanguageTool
docs/database.md
[uncategorized] ~71-~71: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:正确"地"读
Context: ...*: 启动前请确保数据库文件所在目录 (如 ./data
) 已存在且具备正确的读写权限。 2. 并发限制: SQLite 适合轻量级应用场景。如果您的...
(wb4)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (go)
🔇 Additional comments (4)
docs/database.md (4)
33-46
: SQLite 基础配置表述清晰,示例可用基础配置(仅文件路径)与对应环境变量/启动参数示例清晰可用,无歧义。
62-68
: 并发优化与实现一致,信息准确明确启用 WAL 和将 busy_timeout 设为 5000ms。与实现目标一致。
94-105
: MySQL 配置表格规范、参数齐全表头、默认值与常见参数完整清晰,无明显问题。
126-135
: PostgreSQL 配置表格规范、参数齐全字段覆盖常用配置,默认值合理。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
docs/database.md (1)
42-47
: 保持 DSN 示例与实现顺序一致实现中默认 DSN 顺序为
_pragma=busy_timeout(5000)&_pragma=journal_mode(WAL)
,建议将docs/database.md
中的SQLITE_DSN
和--sqlite-dsn
示例调整为相同顺序,以减少认知偏差。待修改位置:
- docs/database.md(第 42–47 行)
更新 diff 示例如下:
- SQLITE_DSN="file:./data/k8m.db?_pragma=journal_mode(WAL)&_pragma=busy_timeout(5000)" + SQLITE_DSN="file:./data/k8m.db?_pragma=busy_timeout(5000)&_pragma=journal_mode(WAL)" @@ - --sqlite-dsn="file:./data/k8m.db?_pragma=journal_mode(WAL)&_pragma=busy_timeout(5000)" + --sqlite-dsn="file:./data/k8m.db?_pragma=busy_timeout(5000)&_pragma=journal_mode(WAL)"
🧹 Nitpick comments (3)
docs/database.md (3)
49-54
: 修复裸链接并提升可读性(消除 MD034)将裸链接改为标准 Markdown 链接,避免 lint 告警并便于点击。
- > - 更多DSN参数,请参考https://github.com/glebarez/go-sqlite?tab=readme-ov-file#connection-string-examples + > - 更多 DSN 参数,请参考 + > [glebarez/go-sqlite - Connection string examples](https://github.com/glebarez/go-sqlite?tab=readme-ov-file#connection-string-examples)
63-63
: 中文措辞微调,避免语法提示并更自然当前“具备正确的读写权限”偶发触发语言工具提示。可微调为更自然的表述。
-1. **目录权限**: 启动前请确保数据库文件所在目录 (如 `./data`) 已存在且具备正确的读写权限。 +1. **目录权限**: 启动前请确保数据库文件所在目录(如 `./data`)已存在,且读写权限已正确配置。
56-60
: 补充对网络/分布式存储的注意事项(WAL 兼容性)在 Kubernetes/容器环境中,NFS、部分分布式/云盘对 SQLite 锁与 WAL 支持不一致,易出现锁冲突或数据损坏。建议在此处追加警示。
为了降低多并发写入时出现 "database is locked" 的风险,K8M 已在内部启用了以下优化: @@ 2. busy_timeout 设置为 5000ms + + > 提示:在网络或分布式文件系统(如 NFS、部分云盘/共享存储)上,文件锁与 WAL 兼容性可能受限,仍可能出现锁冲突或不一致。 + > 建议优先使用本地磁盘或官方明确支持 POSIX 锁的后端;对高并发写入场景,请优先考虑 MySQL/PostgreSQL。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/database.md
(3 hunks)pkg/flag/flag.go
(4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- pkg/flag/flag.go
🧰 Additional context used
🪛 LanguageTool
docs/database.md
[uncategorized] ~63-~63: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:正确"地"读
Context: ...*: 启动前请确保数据库文件所在目录 (如 ./data
) 已存在且具备正确的读写权限。 2. 并发限制: SQLite 适合轻量级应用场景。如果您的...
(wb4)
🪛 markdownlint-cli2 (0.17.2)
docs/database.md
53-53: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (go)
🔇 Additional comments (1)
docs/database.md (1)
73-78
: WAL 备份指引很到位,建议保留已清晰给出 .backup 与 VACUUM INTO 两种安全方案,并对 cp 风险进行充分提示,符合最佳实践。
移除HelmRepository.UpdateContent方法及相关迁移代码
更新air配置排除.env文件