Commit Graph
3 Commits
Author SHA1 Message Date
Olivier 'reivilibre ea4218b16b Schema diff CI: Fix hanging when Rust module changes (#20129)
Follows: #20117

schema_diff: Move faketime so it doesn't affect `poetry install`

Caused a hang in the CI for
https://github.com/element-hq/synapse/pull/20003
whilst recompiling the Rust module (it seems)

---------

Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
2026-08-20 16:43:24 +01:00
Olivier 'reivilibre 5a782430ec Fix the schema diff CI breaking when the Rust module was changed. (#20117)
Follows: #20027

Noticed in https://github.com/element-hq/synapse/pull/20003

The problem was that `--no-root` prevents reinstalling the root project
(Synapse).
However, since we just did a `git checkout`, we need to reinstall the
root project in case the Rust code changed, as the
`poetry install` command is what causes the Rust to be recompiled.

Doing otherwise causes the 'Rust module outdated' error when importing
`synapse`.

---------

Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
2026-08-17 12:47:35 +01:00
Olivier 'reivilibre d80a4e69da Dust off make_full_schema and add CI using it to show schema diffs. (#20027)
It seems a lot of time in our trial tests goes towards setting up the
database. (The same is probably true of Complement too)

We haven't done a full schema for about 20 schema versions, so no
surprise!

As a result, I want to produce a full schema soon.

In this PR I dust off `make_full_schema.sh` (which seems to have broken
after some SQLite changes)
and add a CI workflow that runs it (producing a diff) when someone
changes the schema.

The CI workflow also adds a sticky comment showing the diff on the
schema, so you can better appreciate the final effect of a change.

---

**Dead changes:**

I wanted to make it possible to generate a versioned full schema without
the manual work,
but you can't run the background updates without essentially starting up
a homeserver,
at which point it might fail because you haven't run all the deltas yet.

There's no actual good way to do this, short of deleting the latest
deltas (+ tweaking code to not crash without them)
or rolling back in the git history.

Backed out those changes, but they're preserved on the PR if interesting.

---------

Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
2026-08-11 12:55:59 +01:00