Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test to make sure you can find imported events before room creation - MSC3030 #405

Conversation

MadLittleMods
Copy link
Collaborator

Add test to make sure you can find imported events before room creation

Synapse changes: matrix-org/synapse#13197

MSC3030

@@ -20,7 +20,7 @@ import (
)

func TestJumpToDateEndpoint(t *testing.T) {
deployment := Deploy(t, b.BlueprintFederationTwoLocalOneRemote)
deployment := Deploy(t, b.BlueprintHSWithApplicationService)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this blueprint now because we need an application service bridge user to interact as in order to use the ?ts query parameter with the event /send endpoint.

It has the same remote federated homeserver we need here as well.

@MadLittleMods MadLittleMods marked this pull request as ready for review July 6, 2022 13:59
@MadLittleMods MadLittleMods requested a review from kegsay July 6, 2022 16:14
@MadLittleMods MadLittleMods requested review from a team and removed request for kegsay July 6, 2022 16:44
Copy link
Contributor

@squahtx squahtx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Co-authored-by: Sean Quah <[email protected]>
@MadLittleMods MadLittleMods requested a review from squahtx July 7, 2022 13:39
MadLittleMods added a commit to matrix-org/synapse that referenced this pull request Jul 7, 2022
…before room creation (#13197)

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.

```
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 MadLittleMods merged commit f47bc56 into main Jul 7, 2022
@MadLittleMods MadLittleMods deleted the madlittlemods/fix-msc3030-unbound-local-variable-when-looking-before-room-creation branch July 7, 2022 17:39
@MadLittleMods
Copy link
Collaborator Author

Thanks for the review @squahtx 🐷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants