`psql` outputs it's `NOTICE` messages to stderr causing the action to fail
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- postgresql, typescript
调研方向
阅读链接行中的 src/PsqlFilesExecutor.ts,以追踪 psql stderr 及其退出代码的处理方式。复现 issue 中描述的迁移场景,然后验证 NOTICE 输出不再导致 action 失败,而真正的 psql 失败仍会导致 action 失败。
由索引模型根据 Issue 内容生成。
描述
psql outputs it's NOTICE messages to stderr causing the whole action to fail even if the exit code is 0.
The offending lines of code:
https://github.com/Azure/postgresql/blob/f82d2b25075a9092d3ee987db9c77bcfc43fc6bc/src/PsqlFilesExecutor.ts#L27-L33
https://github.com/Azure/postgresql/blob/f82d2b25075a9092d3ee987db9c77bcfc43fc6bc/src/PsqlFilesExecutor.ts#L38-L40
NOTICE's should be treated as warnings not errors those would be EXCEPTION's.
Maybe there should be an option for choosing to ignore stderr and instead rely on the exit code of psql
It's trivial to get a NOTICE to fail the action.
Consider the following output generated by dotnet ef migrations script -s Proj.Bootstrap -p Proj.Data --idempotent -o migration.sql:
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
"MigrationId" character varying(150) NOT NULL,
"ProductVersion" character varying(32) NOT NULL,
CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId")
);
START TRANSACTION;
....
COMMIT;
If the __EFMigrationsHistory table already exists, the action fails, because psql:/migration.sql:5: NOTICE: relation "__EFMigrationsHistory" already exists, skipping gets written to stderr.
- 主要语言
- TypeScript
- 星标
- 25
- 派生
- 22
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/postgresql 的其他 Issue
-
need-to-triage
难度 2/5 1-3 小时 新手友好度 68/100
Azure/postgresql#58 ·
-
need-to-triage
难度 3/5 1-2 天 新手友好度 35/100
Azure/postgresql#55 ·
-
need-to-triage
难度 5/5 一周以上 新手友好度 20/100
Azure/postgresql#53 · 1 条评论 ·
-
need-to-triage
难度 3/5 1-2 天 新手友好度 25/100
Azure/postgresql#52 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
Azure/postgresql#48 · 2 条评论 · 2 个 reaction ·
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
mksglu/context-mode#1200 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/claude-code#96687 ·
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
AOSSIE-Org/DebateAI#582 · 2 条评论 ·