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

Get back to Recovering syncing when we haven't sync for a while #3995

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

MatMaul
Copy link
Contributor

@MatMaul MatMaul commented Sep 13, 2024

Fixes #3935.

Untested in the apps for now, but integration test is included and working.

Signed-off-by: Mathieu Velten [email protected]

@MatMaul MatMaul requested a review from a team as a code owner September 13, 2024 22:05
@MatMaul MatMaul requested review from jmartinesp and removed request for a team September 13, 2024 22:05
Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.68%. Comparing base (4bcb9b7) to head (e345b5d).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3995   +/-   ##
=======================================
  Coverage   84.67%   84.68%           
=======================================
  Files         269      269           
  Lines       28753    28767   +14     
=======================================
+ Hits        24348    24361   +13     
- Misses       4405     4406    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MatMaul MatMaul marked this pull request as draft September 13, 2024 23:36
@MatMaul MatMaul force-pushed the recovering branch 3 times, most recently from 4f08a1f to 0b79ccb Compare September 13, 2024 23:56
@MatMaul MatMaul marked this pull request as ready for review September 14, 2024 11:53
@bnjbvr bnjbvr requested review from Hywan and removed request for jmartinesp September 15, 2024 08:53
Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Thank you for working on this. I appreciate.

I'm a bit annoyed by the introduction of the new testing feature: we are trying to remove then, and this PR adds a new one. I'm proposing a solution in my comment. Feel free to question my comment.

crates/matrix-sdk-ui/src/room_list_service/state.rs Outdated Show resolved Hide resolved
@MatMaul MatMaul force-pushed the recovering branch 2 times, most recently from a1419c3 to e3d754b Compare September 19, 2024 07:46
Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Thanks! It's indeed much simpler now!

Can you rebase all your patches now? I think we should be good.

@MatMaul MatMaul requested a review from Hywan September 24, 2024 12:04
@MatMaul MatMaul force-pushed the recovering branch 4 times, most recently from 26c8a43 to 6087d41 Compare September 24, 2024 13:14
Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Last bit and we are good!

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

We are close to something I really like, thanks! What's left on your side?

crates/matrix-sdk-ui/src/room_list_service/state.rs Outdated Show resolved Hide resolved
@MatMaul
Copy link
Contributor Author

MatMaul commented Oct 7, 2024

We are close to something I really like, thanks! What's left on your side?

Mainly that last refactor introduced an error somewhere since it seems to break a lot of tests 😅

https://github.com/matrix-org/matrix-rust-sdk/actions/runs/11217272471/job/31178453216?pr=3995

I just tried a revert and tests are back to green (outside of coverage).

I can't really figure out why this is happening so if you can have a look that would be neat.

/// The current state of the `RoomListService`.
current: SharedObservable<State>,

last_sync_date: Instant,
Copy link
Member

Choose a reason for hiding this comment

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

This value is never updated. I'm working on it :-).

@@ -83,6 +127,8 @@ impl State {
}
};

self.set(next_state.clone());
Copy link
Member

Choose a reason for hiding this comment

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

This is the error that makes test_sliding_sync_indicator to fail, and possibly other tests. This method caculates the next state, but the state must be updated if and only if a sync has run. It's RoomListService::sync that is responsible to update the state.

@Hywan
Copy link
Member

Hywan commented Oct 8, 2024

I've pushed tchapgouv#2, it's a patch on your branch. If you merge it, I think this patch should pass all the tests.

Please, rebase all commits into a single one.

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

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

Now we are good! Thanks for having merged my patches and rebased everything!

@Hywan Hywan merged commit 752706c into matrix-org:main Oct 8, 2024
40 checks passed
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.

SSS: Enter "recovering" mode if the app has been offline for "a while"
2 participants