`psql` outputs it's `NOTICE` messages to stderr causing the action to fail
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- postgresql, typescript
Direzione di ricerca
Leggi src/PsqlFilesExecutor.ts alle righe collegate per tracciare come vengono gestiti psql stderr e il relativo codice di uscita. Riproduci lo scenario di migrazione descritto nell’issue, quindi verifica che l’output NOTICE non faccia più fallire l’azione, mentre i veri errori di psql continuino a farlo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 25
- Fork
- 22
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Azure/postgresql
-
Upgrade to Node.js 24 Apertaneed-to-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Azure/postgresql#58 ·
-
need-to-triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Azure/postgresql#55 ·
-
need-to-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Azure/postgresql#53 · 1 commento ·
-
need-to-triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
Azure/postgresql#52 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
Azure/postgresql#48 · 2 commenti · 2 reazioni ·
Tutte le issue di Azure/postgresql
Issue simili
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Mend: dependency security vulnerability untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100