-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Actually fix bad debug logging rejecting device list & signing key transactions #12098
Changes from 4 commits
e21a6d2
2e36f23
39022bd
6b0446a
4f4127b
1cfd4e5
d950e3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix a bug introduced in Synapse 1.51.0rc1 where incoming federation transactions containing at least one EDU would be dropped if debug logging was enabled for `synapse.8631_debug`. Synapse 1.53.0rc1 included a partial fix this ([#11890](https://github.com/matrix-org/synapse/pull/11890)), but the fix was incorrect: EDUs containing device list or signing key updates would still be dropped. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
# limitations under the License. | ||
|
||
from tests import unittest | ||
from tests.unittest import override_config | ||
from tests.unittest import override_config, DEBUG | ||
|
||
|
||
class RoomDirectoryFederationTests(unittest.FederatingHomeserverTestCase): | ||
|
@@ -38,3 +38,19 @@ def test_open_public_room_list_over_federation(self): | |
"/_matrix/federation/v1/publicRooms", | ||
) | ||
self.assertEqual(200, channel.code) | ||
|
||
@DEBUG | ||
def test_edu_debugging_doesnt_explode(self): | ||
"""Sanity check fed. RX succeeds with `synapse.debug_8631` logging enabled. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know what "RX" means, could you update this comment please? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TX: transmit not sure where the abbreviation comes from. Synapse uses the former in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Possible etymology: https://en.wikipedia.org/wiki/RS-232 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! fwiw I just read |
||
|
||
Remove this when we strip out issue_8631_logger. | ||
""" | ||
channel = self.make_signed_federation_request( | ||
"PUT", | ||
"/_matrix/federation/v1/send/txn_id_1234/", | ||
content={ | ||
"edus": [{"edu_type": "m.device_list_update", "content": {"foo": "bar"}}], | ||
"pdus": [], | ||
}, | ||
) | ||
self.assertEqual(200, channel.code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure it's worth mentioning #11890 since it didn't end up fixing it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just want to clarify that I've not accidentally copied and pasted a bugfix line from 1.53's release notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, though I'd tend to think looking at the PR is enough to tell that