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 Device list doesn't change if remote server is down #1142

Merged
merged 3 commits into from
Sep 16, 2021

Conversation

DMRobertson
Copy link
Contributor

Closes #1136

@DMRobertson DMRobertson requested review from a team September 16, 2021 10:45
@DMRobertson
Copy link
Contributor Author

Slightly concerned that I've made things worse for Dendrite somehow.

Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

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

I wish we had a linter.

tests/50federation/40devicelists.pl Outdated Show resolved Hide resolved
tests/50federation/40devicelists.pl Outdated Show resolved Hide resolved
# replication
#
# Sync so that we have a chance for the replication to propagate.
sync_until_user_in_device_list($local_user, new_User(user_id=>$outbound_client_user, http=>"", server_name=>""));
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
sync_until_user_in_device_list($local_user, new_User(user_id=>$outbound_client_user, http=>"", server_name=>""));
sync_until_user_in_device_list( $local_user,
new_User( user_id => $outbound_client_user, http => "", server_name => "" )
);

I wonder if instead we should change sync_until_user_in_device_list to accept a user ID as the second param? Probably a lot nicer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd be tempted to make it accept either a User struct or a user ID, if only because I don't want to touch all of the other call sites. I'm not sure if there's a good perl idiom for that?

tests/50federation/40devicelists.pl Outdated Show resolved Hide resolved
tests/50federation/40devicelists.pl Outdated Show resolved Hide resolved
tests/50federation/40devicelists.pl Outdated Show resolved Hide resolved
tests/50federation/40devicelists.pl Outdated Show resolved Hide resolved
tests/50federation/40devicelists.pl Outdated Show resolved Hide resolved
tests/50federation/40devicelists.pl Outdated Show resolved Hide resolved
@kegsay
Copy link
Member

kegsay commented Sep 16, 2021

Looks decent enough to me. Dendrite is likely unhappy because you're now relying on device lists in /sync which Dendrite has issues with.

@DMRobertson
Copy link
Contributor Author

I wish we had a linter.

Does https://metacpan.org/dist/Perl-Tidy/view/bin/perltidy suffice?

Co-authored-by: Erik Johnston <erik@matrix.org>
Sorry, I didn't want to go around updating every other call site
@DMRobertson
Copy link
Contributor Author

CI passed for all synapses (sorry Dendrite)

@DMRobertson
Copy link
Contributor Author

Looks decent enough to me. Dendrite is likely unhappy because you're now relying on device lists in /sync which Dendrite has issues with.

@kegsay is it worth blacklisting these in Dendrite? (On the one hand I didn't want to suppress the fact that dendrite has an issue there; on the other I don't want to cause people pain by having CI failures across the board.)

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.

Device list doesn't change if remote server is down is flaky
3 participants