Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

`psql` outputs it's `NOTICE` messages to stderr causing the action to fail

Abierto
#33 9 comentarios 5 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
postgresql, typescript
Área
databases, devops

Línea de trabajo

Lee src/PsqlFilesExecutor.ts en las líneas enlazadas para rastrear cómo se gestionan psql stderr y su código de salida. Reproduce el escenario de migración descrito en el issue y verifica que la salida NOTICE ya no haga fallar la action, mientras que los fallos reales de psql sigan haciéndolo.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

need-to-triage

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.

Lenguaje dominante
TypeScript
Estrellas
25
Forks
22
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Azure/postgresql

Todos los issues de Azure/postgresql

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.