element-hq / element-hq/synapse

Disable `SYNAPSE_TEST_PATCH_LOG_CONTEXTS` causing false negatives in tests

Open
#12,796 0 comments 0 reactions 0 assignees View on GitHub
A-Testing T-Task
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#12796](https://github.com/matrix-org/synapse/issues/12796).

---

`SYNAPSE_TEST_PATCH_LOG_CONTEXTS` causes Synapse to monkey-patch `defer.inlineCallbacks` to add some checks that we handle logcontexts correctly. We enable it when running sytests (and possibly trial tests?)

The problem is that it is now causing false negatives (in particular, `txredisapi` also uses `inlineCallbacks`, and because it's not Synapse code, it fails the checks).

A better alternative might be to modify the places we use `defer.ensureDeferred` to do this wrapping instead. For now, we should probably just disable it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.