Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Support HS upgrade tests

未关闭
#150 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 14 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
docker, go, postgres

调研方向

首先阅读 cmd/dendrite-upgrade-tests 和 Complement 的 /tests 基础设施,然后检查处理 SYNAPSE_VERSION 的 dockerfiles/Synapse.Dockerfile。在实现之前明确拟议的 HS_VERSION 和持久化契约;完成时应包含一条有文档记录且可重复的受支持 homeserver 升级测试路径。

由索引模型根据 Issue 内容生成。

描述

enhancement

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?

主要语言
Go
星标
101
派生
72
平均合并
11 天 5 小时
30 天内合并 PR
7

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

matrix-org/complement 的其他 Issue

查看 matrix-org/complement 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。