mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-13 07:38:07 +00:00
Gets one step further in the job started by https://github.com/matrix-org/synapse/pull/12893 Part of: https://github.com/element-hq/synapse/issues/20026 ## Manual testing strategy Unfortunately it's quite difficult to actually trigger this. You need to: - check out an old full_schema, e.g. 54 which was present when `v1.62.0` was released - remove the version 72 `full_schema`, as it already has the background update applied - remove some deltas that are broken when upgrading across such a large version gap (!) https://github.com/element-hq/synapse/issues/20070 - then run any trial test with Postgres enabled to prove that the database schema applies ``` git checkout v1.62.0 -- synapse/storage/schema/state/full_schemas/54 git checkout v1.62.0 -- synapse/storage/schema/main/full_schemas/54 git checkout v1.62.0 -- synapse/storage/schema/common/full_schemas/54 rm -r synapse/storage/schema/*/full_schemas/72 rm synapse/storage/schema/main/delta/58/10_pushrules_enabled_delete_obsolete.sql rm synapse/storage/schema/main/delta/79/04_mitigate_stream_ordering_update_race.py rm synapse/storage/schema/main/delta/56/redaction_censor3_fix_update.sql.postgres rm synapse/storage/schema/main/delta/60/01recreate_stream_ordering.sql.postgres SYNAPSE_TEST_LOG_LEVEL=DEBUG SYNAPSE_POSTGRES=1 poetry run trial tests.handlers.test_sliding_sync.ComputeInterestedRoomsTestCase_new.test_no_joins_after_to_token ``` As light validation, I purposefully inserted a SQL error into the query to check that it is caught by the above testing strategy. --------- Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>