Skip to content

Conversation

zecakeh
Copy link
Collaborator

@zecakeh zecakeh commented Mar 14, 2025

This exposes the server builder code that was used behind the sso-login feature so that it can be reused in other places, like during OAuth 2.0 login. It's called LocalServerBuilder and is behind the local-server feature.

I added types around the channels to make the API easier to use and harder to misuse (if the shutdown signal is not sent, the server will keep running). They are inspired by tokio's JoinHandle and AbortHandle.

@zecakeh zecakeh requested a review from a team as a code owner March 14, 2025 18:30
@zecakeh zecakeh requested review from Hywan and removed request for a team March 14, 2025 18:30
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

Attention: Patch coverage is 87.23404% with 12 lines in your changes missing coverage. Please review.

Project coverage is 86.43%. Comparing base (cabb345) to head (b720ac2).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/utils/local_server.rs 90.69% 8 Missing ⚠️
...rix-sdk/src/authentication/matrix/login_builder.rs 50.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4804      +/-   ##
==========================================
+ Coverage   86.40%   86.43%   +0.03%     
==========================================
  Files         295      296       +1     
  Lines       34458    34498      +40     
==========================================
+ Hits        29772    29819      +47     
+ Misses       4686     4679       -7     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

I think this is a great improvement. Thanks for your work!

@Hywan Hywan merged commit f9b1bdb into matrix-org:main Mar 18, 2025
44 checks passed
@zecakeh zecakeh deleted the local-server branch March 18, 2025 09:20
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.

2 participants