Fix the cargo-test and cargo-bench CI jobs not running#19883
Merged
Conversation
…obs are skipped If the README was not edited, then `lint-readme` was skipped. Which, because these jobs depended on `linting-done`, which depends on `lint-readme`, would cause them to be skipped as well.
Otherwise we need to bump the MSRV to 1.96.0.
The rust layer had its strict canonicaljson checking relaxed in #19816, which broke the rust test. However, due to rust tests not running on PRs, this wasn't noticed. To keep the relaxed stance while ensuring we check canonicaljson for new events in the python layer, the rust test was adjusted and a new python test added instead.
Otherwise we'd get the following test failure: ---- events::tests::test_v4_validate_rejects_missing_room_id_for_non_create stdout ---- thread 'events::tests::test_v4_validate_rejects_missing_room_id_for_non_create' (2924904) panicked at rust/src/events/mod.rs:848:9: assertion failed: event.specific_fields.validate(&event.common_fields).is_err() note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This reverts commit 164ebd1.
The `cargo-bench` workflow was failing due to the nightly there being too old. Conversely, we were using nightlies that were too new in some tests, which may allow some 1.88.0+ code without declaring a minimum rust requirement. This commit converges them on one of the latest nightlies before 1.88.0.
erikjohnston
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Originally reported by @jason-famedly in #synapse-dev.
Previously the
cargo-testandcargo-benchGitHub action jobs weren't running unless Synapse's README was also updated (due to workflow job dependency trees; see the code for an explanation).After fixing that, there were several test failures that went uncaught in recent PRs. Those are fixed by the final commits.
Commits overview:
The REVERT commit shows that the
cargo-test/cargo-benchjobs were skipped, despite rust changes: https://github.com/element-hq/synapse/actions/runs/28236457883/job/83652600210?pr=19883The "Allow
cargo-test,cargo-benchto run ..." commit shows that those tests now run: https://github.com/element-hq/synapse/actions/runs/28387764452/job/84107137867?pr=19883The remaining commits fix the rust tests, and require some extra review (ideally from @erikjohnston as they apply to his past PRs).
Finally, we revert the original rust change.
(finally finally) We bump the nightly rust version to get
cargo-benchtests to pass. Otherwise we'd get:Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.