matrix-org / matrix-org/complement
Support HS upgrade tests
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Go
- Estrellas
- 99
- Forks
- 72
- Merge medio
- 4 d 1 h
- PR fusionados (30 d)
- 8
Descripción
Dendrite has https://github.com/matrix-org/dendrite/tree/master/cmd/dendrite-upgrade-tests which will automatically pull and run different versions of dendrite with the same database and ensure db migrations work correctly. It can be run for example by doing ./dendrite-upgrade-tests --from 0.1.0 --to 0.3.1. This will:
- Fetch semver looking tags from github (or
HEAD). - Sort them.
- Pull archives for each release.
- Execute a Dockerfile with the build context set to the root directory of the release.
- Run the lowest semver, make some users and rooms, send a few messages, tear down the server.
- Keep the database as a docker volume.
- Repeat with the next lowest semver up until
--to. - Test that the last HS run has the original users/rooms/messages from all previous runs.
It looks like Synapse has some bisectability baked into the Complement Synapse image: https://github.com/matrix-org/complement/blob/76db9e5ae6c45d889000feb19f024f184c8bd6e3/dockerfiles/Synapse.Dockerfile#L14
If Complement standardised the format of this (e.g thou shalt accept the build arg HS_VERSION=$semver) then we could, in theory, make https://github.com/matrix-org/dendrite/tree/master/cmd/dendrite-upgrade-tests work for any HS (modulo working out how to do persistence, as currently Dendrite uses postgres and that assumption is baked into the upgrade testing infra: this could just be stating that the directory /data is persisted across runs and you need to just dump your DB there).
This arguably is and isn't feature creep. It is feature creep because it has nothing to do with the integration tests in /tests. It isn't feature creep because it is still ultimately testing HSes, just the upgrade paths.
Thoughts @richvdh (on the basis that you added SYNAPSE_VERSION?
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza leyendo cmd/dendrite-upgrade-tests y la infraestructura de /tests de Complement; después inspecciona dockerfiles/Synapse.Dockerfile, donde se gestiona SYNAPSE_VERSION. Aclara el contrato propuesto de HS_VERSION y persistencia antes de la implementación; el trabajo terminado debería incluir una ruta de pruebas de actualización documentada y reproducible para los homeservers compatibles.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- docker, go, postgres
- Área
- databases, devops, testing
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100