Choose the deploy arguments without relying on the CLI's release version

Abierto
#27 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
github-actions, javascript, node.js

Línea de trabajo

Start in cli.mjs, where takesEntryFlag and takesEnvironmentFlag pick the arguments for prisma deploy from the package version, and see how the -dev.N suffix is dropped. Try a dev version such as 8.0.0-rc.34-dev.189 to reproduce the wrong choice. Done means dev builds at or after the changed argument get the right flag, and tests/prisma-cli.test.mjs passes. The README note about the path, PRISMA_CLI_BINS and test titles is a second part of the work.

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

Descripción

The action chooses the arguments for prisma deploy from the version of the installed prisma package (cli.mjs: takesEntryFlag, takesEnvironmentFlag). For example, it passes --environment to 8.0.0-rc.30 and later, and --stage before that.

A dev build of the CLI has the version of the last release plus -dev.N, for example 8.0.0-rc.34-dev.189. The rule ignores the -dev.N part. So when a deploy argument changes in a dev build, the action cannot tell that build from the unchanged release with the same base version.

Why it matters

prisma/prisma-cli#394 makes prisma-cli run this repository's tests/prisma-cli.test.mjs against every dev build it publishes. After an argument change, that check stays red, and alerts on every merge to prisma-cli's main, until the next CLI release has a version the action's rule can name. The action can only be fixed for the next release number, not for the dev builds that already have the change.

Options

  • Compare the -dev.N number as well. Dev build numbers only go up, so "rc.34-dev.200 or later" is a precise rule.
  • Ask the CLI what it accepts, for example by reading prisma deploy --help, and stop relying on the version.

Also

prisma-cli depends on two things here: the path tests/prisma-cli.test.mjs, and the PRISMA_CLI_BINS variable it reads. It also finds the deploy cases by their test titles. The README should say so, so that nobody renames them without changing prisma-cli's scripts/check-cloud-deploy-action.mjs.

Lenguaje dominante
JavaScript
Estrellas
2
Forks
6
Merge medio
6 d 8 h
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 prisma/cloud-deploy-action

Todos los issues de prisma/cloud-deploy-action

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.