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

Cypress test should send unsubscribe_rooms for every room switch seems flakey #36

Open
DMRobertson opened this issue Mar 21, 2023 · 7 comments
Labels
flake Tests that fail intermittently; sporadic false positives

Comments

@DMRobertson
Copy link
Contributor

e.g. https://github.com/matrix-org/sliding-sync/actions/runs/4482864263/jobs/7881442972

      AssertionError: room_subscriptions is object: expected undefined to be an object
DMRobertson pushed a commit that referenced this issue Mar 21, 2023
Might help with e.g. #36
@kegsay kegsay added this to the v1 milestone Mar 27, 2023
@kegsay
Copy link
Member

kegsay commented Mar 27, 2023

Related: #42 ? Need to check video.

@DMRobertson
Copy link
Contributor Author

@DMRobertson DMRobertson added the flake Tests that fail intermittently; sporadic false positives label Apr 5, 2023
@DMRobertson
Copy link
Contributor Author

@DMRobertson
Copy link
Contributor Author

I spent an hour or so looking into this. From what I can see, the react/js sdk maintains an explicit subscription to whichever room is open in the client. (You still want to see updates that room, even if it's outside of your sliding window(s).)

AFAICS The room_subscriptions field is populated here, whenever newSubscriptions is nonempty.

https://github.com/matrix-org/matrix-js-sdk/blob/c805b7e29d6c8fd592112df8acc7ea78c532db5e/src/sliding-sync.ts#L850-L866

newSubscriptions is the set difference this.desiredRoomSubscriptions - this.confirmedRoomSubscriptions. So the room we're looking for is either not desired, already confirmed, or both when we see this failure mode.

I guess the next step would be to get the SDK to log those sets and somehow get CI to expose those logs to us.

@DMRobertson
Copy link
Contributor Author

I haven't seen this fail in a while. Maybe something got fixed in the react/js sdk?

@DMRobertson
Copy link
Contributor Author

Let's assume this magically unflaked itself, and reopen if not.

@DMRobertson
Copy link
Contributor Author

Let's assume this magically unflaked itself, and reopen if not.

Spoke too soon. https://github.com/matrix-org/sliding-sync/actions/runs/5598990176/jobs/10239377271

@DMRobertson DMRobertson reopened this Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flake Tests that fail intermittently; sporadic false positives
Projects
None yet
Development

No branches or pull requests

2 participants