This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix exception when using MSC3030 to look for remote federated events before room creation #13197
Merged
MadLittleMods
merged 6 commits into
develop
from
madlittlemods/fix-msc3030-unbound-local-variable-when-looking-before-room-creation
Jul 7, 2022
Merged
Fix exception when using MSC3030 to look for remote federated events before room creation #13197
MadLittleMods
merged 6 commits into
develop
from
madlittlemods/fix-msc3030-unbound-local-variable-when-looking-before-room-creation
Jul 7, 2022
Conversation
This file contains 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
…before room creation This happens when you have some messages imported before the room is created. Then use MSC3030 to look backwards before the room creation from a remote federated server. The server won't find anything locally, but will ask over federation which will have the remote event. The previous logic would choke on not having the local event assigned. ``` Failed to fetch /timestamp_to_event from hs2 because of exception(UnboundLocalError) local variable 'local_event' referenced before assignment args=("local variable 'local_event' referenced before assignment",) ```
MadLittleMods
added
the
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
label
Jul 6, 2022
MadLittleMods
added a commit
to matrix-org/complement
that referenced
this pull request
Jul 6, 2022
…ariable-when-looking-before-room-creation
squahtx
reviewed
Jul 7, 2022
squahtx
approved these changes
Jul 7, 2022
MadLittleMods
deleted the
madlittlemods/fix-msc3030-unbound-local-variable-when-looking-before-room-creation
branch
July 7, 2022 16:52
MadLittleMods
commented
Jul 7, 2022
@@ -1375,6 +1375,7 @@ async def get_event_for_timestamp( | |||
# the timestamp given and the event we were able to find locally |
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.
Thanks for the review @squahtx 🐰
MadLittleMods
added a commit
to matrix-org/complement
that referenced
this pull request
Jul 7, 2022
…on - MSC3030 (#405) Synapse changes: matrix-org/synapse#13197
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fix exception when using MSC3030 to look for remote federated events before room creation.
Complement tests: matrix-org/complement#405
This happens when you have some messages imported before the room is created.
Then use MSC3030 to look backwards before the room creation from a remote
federated server. The server won't find anything locally, but will ask over
federation which will have the remote event. The previous logic would
choke on not having the local event assigned.
Dev notes
The
got
is because it has those state events locally even though that user joined after those events. We want the imported event which has a timestamp before the creation event.Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.Pull request includes a sign off(run the linters)