matrix-org / matrix-org/complement

Support HS upgrade tests

Aperta
#150 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement
Lingua principale
Go
Stelle
99
Fork
72
Merge medio
4g 1h
PR unite (30g)
8

Descrizione

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`?

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia leggendo cmd/dendrite-upgrade-tests e l’infrastruttura /tests di Complement, quindi esamina dockerfiles/Synapse.Dockerfile, dove viene gestito SYNAPSE_VERSION. Chiarisci il contratto proposto per HS_VERSION e la persistenza prima dell’implementazione; il lavoro completato dovrebbe includere un percorso di test di aggiornamento documentato e ripetibile per gli homeserver supportati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
docker, go, postgres
Ambito
databases, devops, testing
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.