Add verbose logging and log-level selection to DataProviderMigrate CLI
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- csharp, postgresql
- 领域
- cli, databases, observability
调研方向
Start by locating the DataProviderMigrate migrate command, its help output, and the existing logging setup. Trace where schema loading, inspection, diffing, filtering, and application occur. Done means explicit log-level controls expose the requested diagnostics while connection strings and credentials remain redacted.
由索引模型根据 Issue 内容生成。
描述
Problem
When DataProviderMigrate reports an unexpected result, there is currently no CLI-supported way to see what it inspected, diffed, filtered, or applied.
The current help output exposes these migrate options only:
--schema
--output
--provider
--allow-destructive
--phase
There is no --verbose, --log-level, --debug, or equivalent option.
Setting common .NET logging environment variables such as Logging__LogLevel__Default=Trace did not produce additional diagnostics. The CLI still printed only the normal summary.
Required behavior
Add explicit logging controls to the migration CLI, for example:
DataProviderMigrate migrate \
--schema migrations/schema.yaml \
--output "$PG_URL" \
--provider postgres \
--log-level trace
or:
--verbose
--quiet
Logging should expose
At debug/trace level, the CLI should print enough information to diagnose schema drift and diff bugs without attaching a debugger:
- which schema file was loaded and parsed
- all tables discovered in YAML
- live database objects inspected per table
- desired vs actual object summaries
- generated diff operations before phase/destructive filtering
- operations removed by
--phase - operations removed because
--allow-destructiveis absent - SQL or operation descriptions that will be applied, with secrets redacted
- post-apply verification results once that verification exists
Security requirement
Connection strings and credentials must be redacted in logs by default. It is fine to show host/database/user, but passwords and tokens must never be printed in full.
Why this matters
During a production migration incident, the tool reported Schema is up to date even though a declared unique constraint was missing from PostgreSQL. Without verbose logging, there was no way to tell whether the YAML parser ignored the uniqueConstraints block, the inspector missed live constraints, the diff skipped unique constraints, or operation application failed.
Operators need first-class CLI diagnostics to understand what the migrator is doing.
- 主要语言
- C#
- 星标
- 68
- 派生
- 4
- 平均合并
- 50 分钟
- 30 天内合并 PR
- 2
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Nimblesite/DataProvider 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 92/100
Nimblesite/DataProvider#137 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
Nimblesite/DataProvider#72 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
Nimblesite/DataProvider#121 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
Nimblesite/DataProvider#108 ·
维护者通常 1 天内回复
-
A check constraint the schema cannot name can never be retired, and keeps enforcing the old rule未关闭
难度 4/5 3-5 天 新手友好度 48/100
Nimblesite/DataProvider#107 ·
维护者通常 1 天内回复
查看 Nimblesite/DataProvider 的全部 Issue
相似的 Issue
-
kronos:develop:queued priority:P0
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
nopSolutions/nopCommerce#8512 ·
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
modelcontextprotocol/csharp-sdk#2061 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复