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

Run multiple event persisters when using Redis #972

Merged
merged 5 commits into from
Oct 13, 2020

Conversation

erikjohnston
Copy link
Member

This makes SyTest test Synapse's sharded event persister set up.

Requires matrix-org/synapse#8499

@erikjohnston erikjohnston requested a review from a team October 8, 2020 11:26
@clokep
Copy link
Member

clokep commented Oct 8, 2020

@erikjohnston Looks like this has some failing tests!

})->then( sub {
# Check public rooms list for local user
my ( $body ) = @_;
retry_until_success {
Copy link
Member

Choose a reason for hiding this comment

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

why are these changes necessary? And if they are really necessary, can we limit the number of times we retry, rather than going on forever?

Copy link
Member Author

@erikjohnston erikjohnston Oct 13, 2020

Choose a reason for hiding this comment

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

The test was flakey. This may no longer be necessary, but in general I don't think the public room lists get updated immediately (as they can be populated via background processes).

The retry_until_success will get killed by the test timeout, which is how we use retry_until_success/repeat_until_true elsewhere?

Copy link
Member

Choose a reason for hiding this comment

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

could you add a comment to say that we're retrying because the directory is updated asynchonously, or sth.

My main gripe with retry_until_success is that it turns test failures into test timeouts, which we tend to ignore as "oh we had a slow VM for random reasons", so a limit on the number of retries is preferable if possible.

The other problem with retry_until_success is that it swallows the failure, so you can't see what's going wrong. https://github.com/matrix-org/sytest/blob/develop/tests/30rooms/04messages.pl#L387-L408 includes a bunch of code to log what's going on, but on closer inspection maybe we should put all that boilerplate into retry_until_success (which could maybe also benefit from a "try N times" param which defaults to something other than "infinity").

Copy link
Member Author

Choose a reason for hiding this comment

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

Have added a comment.

Yeah, I think that sounds like a general issue with retry_until_success. We use this pattern a lot so it feels like something to investigate and improve separately.

tests/30rooms/60version_upgrade.pl Outdated Show resolved Hide resolved
tests/30rooms/60version_upgrade.pl Outdated Show resolved Hide resolved
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
@erikjohnston erikjohnston merged commit 6e08c8f into develop Oct 13, 2020
@erikjohnston erikjohnston deleted the erikj/periodic_poke branch October 13, 2020 10:57
richvdh added a commit that referenced this pull request Oct 15, 2020
Seems to have broken in #972
richvdh added a commit that referenced this pull request Oct 16, 2020
Seems to have broken in #972
richvdh added a commit that referenced this pull request Oct 16, 2020
For the second time this week (#972 and #973), I've found myself wondering why
a test was failing and discovered that it is due to it relying on new
functionality in Future 0.45. I guess we may as well bump the dep as try to
keep our tests backwards-compatible, particularly given the CI uses the latest
version.
richvdh added a commit that referenced this pull request Oct 19, 2020
For the second time this week (#972 and #973), I've found myself wondering why
a test was failing and discovered that it is due to it relying on new
functionality in Future 0.45. I guess we may as well bump the dep as try to
keep our tests backwards-compatible, particularly given the CI uses the latest
version.
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.

3 participants