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

crypto: Fetch immediately-available sender data when we receive a room key #3590

Merged
merged 29 commits into from
Jul 16, 2024

Conversation

andybalaam
Copy link
Contributor

@andybalaam andybalaam commented Jun 20, 2024

Part of #3543. Builds on top of #3556

Implements the "fast lane" as described in #3544

This will begin to populate InboundGroupSessions with the new SenderData struct introduced in #3556 but it will only do it when the information is already available in the store. Future PRs for this issue will query Matrix APIs using spawned async tasks.

Future issues will do retries and migration of old sessions.

@andybalaam andybalaam force-pushed the andybalaam/sender_data_from_to_device branch from cc82725 to d53fe25 Compare June 20, 2024 16:12
@andybalaam andybalaam force-pushed the andybalaam/sender-data-in-igs branch 3 times, most recently from 626c497 to f4ad80b Compare June 24, 2024 12:28
@andybalaam andybalaam force-pushed the andybalaam/sender_data_from_to_device branch from d53fe25 to f1ad14a Compare June 26, 2024 10:33
@andybalaam andybalaam force-pushed the andybalaam/sender-data-in-igs branch 3 times, most recently from 73cfc13 to ae2756b Compare June 26, 2024 13:05
@andybalaam andybalaam force-pushed the andybalaam/sender_data_from_to_device branch from f1ad14a to 7152714 Compare June 26, 2024 14:49
@andybalaam andybalaam marked this pull request as ready for review June 26, 2024 14:49
@andybalaam andybalaam requested a review from a team as a code owner June 26, 2024 14:49
@andybalaam andybalaam requested review from Hywan and removed request for a team June 26, 2024 14:49
Base automatically changed from andybalaam/sender-data-in-igs to main June 28, 2024 12:14
@poljar poljar requested review from poljar and removed request for Hywan July 1, 2024 06:41
@andybalaam
Copy link
Contributor Author

Rebasing because this is a mess after the merge of #3556

@andybalaam andybalaam force-pushed the andybalaam/sender_data_from_to_device branch from 289f653 to dd5baf8 Compare July 1, 2024 15:17
@andybalaam
Copy link
Contributor Author

Rebased on top of #3633

Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 86.58537% with 11 lines in your changes missing coverage. Please review.

Project coverage is 84.37%. Comparing base (a5dbfa6) to head (d496196).
Report is 18 commits behind head on main.

Files Patch % Lines
...rypto/src/olm/group_sessions/sender_data_finder.rs 80.48% 8 Missing ⚠️
...k-crypto/src/session_manager/group_sessions/mod.rs 87.50% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3590   +/-   ##
=======================================
  Coverage   84.37%   84.37%           
=======================================
  Files         258      259    +1     
  Lines       26656    26722   +66     
=======================================
+ Hits        22491    22547   +56     
- Misses       4165     4175   +10     

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

@andybalaam andybalaam force-pushed the andybalaam/sender_data_from_to_device branch from 4ad12a0 to 3f79f0f Compare July 3, 2024 12:19
@andybalaam andybalaam changed the base branch from main to andybalaam/move-device_keys-out-of-content July 3, 2024 12:19
@andybalaam andybalaam force-pushed the andybalaam/move-device_keys-out-of-content branch from 1c5f302 to 25ed92f Compare July 4, 2024 10:07
Base automatically changed from andybalaam/move-device_keys-out-of-content to main July 4, 2024 10:22
@andybalaam andybalaam force-pushed the andybalaam/sender_data_from_to_device branch from 3f79f0f to 5d3f9ed Compare July 4, 2024 10:38
@andybalaam
Copy link
Contributor Author

@poljar this is now rebased and ready to review.

Copy link
Contributor

@poljar poljar 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 we might simplify this a bit. Please correct me if I'm wrong.

@andybalaam andybalaam force-pushed the andybalaam/sender_data_from_to_device branch from 7530f67 to 41d024b Compare July 12, 2024 13:14
Copy link
Contributor

@poljar poljar 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 that this can be further simplified if we use the functionality the Device offers.

@andybalaam andybalaam requested a review from poljar July 15, 2024 15:40
Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

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

Alright, I think this is functionally fine, except maybe one thing I raised we should discuss.

I left a bunch of documentation nits, feel free to fight back on them if you disagree.

@andybalaam andybalaam requested a review from poljar July 16, 2024 10:55
Copy link
Contributor

@poljar poljar 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 that this is good now, let's just clear up the history I wonder why our CI check for fixup commits didn't kick in, perhaps because the PR is older than the CI check?

@andybalaam andybalaam merged commit 8845550 into main Jul 16, 2024
40 checks passed
@andybalaam andybalaam deleted the andybalaam/sender_data_from_to_device branch July 16, 2024 12:04
@andybalaam
Copy link
Contributor Author

I wonder why our CI check for fixup commits didn't kick in

Or maybe because I just manually named the commits with fixup: rather than using --fixup because that doesn't allow me to describe the commit (unless I missed a flag)

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