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

Attempt to deflake uploading signed devices gets propagated over federation #1169

Merged
merged 8 commits into from
Nov 24, 2021

Conversation

DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Nov 17, 2021

Fixes #1167 hopefully.

@DMRobertson DMRobertson requested a review from a team as a code owner November 17, 2021 17:44
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

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

With my non-perl hat on.

tests/41end-to-end-keys/08-cross-signing.pl Outdated Show resolved Hide resolved
tests/41end-to-end-keys/08-cross-signing.pl Outdated Show resolved Hide resolved
tests/41end-to-end-keys/08-cross-signing.pl Outdated Show resolved Hide resolved
Co-authored-by: Andrew Morgan <[email protected]>
@richvdh richvdh changed the title Attempt to deflake `uploading signed devices gets propagated over fed… Attempt to deflake uploading signed devices gets propagated over federation Nov 19, 2021
run-tests.pl Outdated Show resolved Hide resolved
tests/41end-to-end-keys/08-cross-signing.pl Outdated Show resolved Hide resolved
Comment on lines 691 to 692
$content->{device_keys}->{$user2_id}->{$user2_device}->{"signatures"}
or die "No 'signatures' key present";
Copy link
Member

Choose a reason for hiding this comment

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

is it sufficient to wait for anything at $content->{device_keys}{$user2_id}{$user2_device}, or do we need to wait for there to be a signatures element?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I understand it, we need to wait for the signatures in particular.

On server1:

  1. user2 joins a room
  2. user2 uploads signatures

On server0, user1 syncs until they see user2's device. This is racey: the sync may complete before the signatures have uploaded, propagated over federation and then over replication.

Copy link
Member

Choose a reason for hiding this comment

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

right. please could you add these words to a comment in the code.

tests/41end-to-end-keys/08-cross-signing.pl Outdated Show resolved Hide resolved
David Robertson and others added 3 commits November 22, 2021 11:42
Co-authored-by: Richard van der Hoff <[email protected]>
Co-authored-by: Richard van der Hoff <[email protected]>
@DMRobertson DMRobertson requested a review from richvdh November 23, 2021 14:02
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

generally lgtm, if you can expand the comment about what we're waiting for and why.

@DMRobertson DMRobertson merged commit 7922806 into develop Nov 24, 2021
@DMRobertson DMRobertson deleted the dmr/deflake-uploading-signed-devices branch November 24, 2021 18:24
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.

uploading signed devices gets propagated over federation is flaky
3 participants