Add CI jobs to act as a sanity check for PRs containing database migrations

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

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
51/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
ci-cd, database

Línea de trabajo

Start by reading the repository’s CI configuration and database migration files to see how migrations are named and run. Add checks for duplicate migration numbers and imports from database models in new migrations. Done means pull requests containing migrations receive both checks, with clear failures when either rule is violated.

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

Descripción

devops

Database migrations are one of the parts of the codebase that recieves the most review scrutiny, most of it very rules-based and mechanical.

We can convert these into CI checks to focus reviews on the less mechanical parts (i.e. "how will this affect existing instances")

Some criteria to check new PRs for (if they contain a new database migration):

  • That the migration number is not duplicated with an existing migration (i.e. two PRs create migrations with the same next number) - although this may not be fully reliable, if one PR merges and the other doesnt get rebased, the check may not rerun.
  • Ensuring that there are no import statements that import anything from the database models (use of DB models should be minimal or nonexistent, and if there is a reason for it, the models should be copy pasted into the migration)
Lenguaje dominante
Python
Estrellas
17
Forks
30
Merge medio
6 h 16 min
PR fusionados (30 d)
9

Preparar el entorno

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 chaoss/CollectOSS

Todos los issues de chaoss/CollectOSS

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.