`psql` outputs it's `NOTICE` messages to stderr causing the action to fail
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- postgresql, typescript
調査の方向性
リンク先の行にある src/PsqlFilesExecutor.ts を読み、psql stderr とその終了コードがどのように処理されているかを追跡します。issue に記載されたマイグレーションシナリオを再現し、NOTICE の出力では action が失敗しなくなっている一方で、実際の psql の失敗では引き続き失敗することを確認します。
索引モデルが 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 1週間以上 初心者へのやさしさ 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 件 ·
Azure/postgresql の issue をすべて見る
似ている issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100