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

Refactoring ACI/PNI storage types #275

Merged
merged 13 commits into from
Jan 14, 2024
Merged

Refactoring ACI/PNI storage types #275

merged 13 commits into from
Jan 14, 2024

Conversation

rubdos
Copy link
Member

@rubdos rubdos commented Jan 4, 2024

Branch as I go along, with things that I disagree with :'-)

  • Allow ACI/PNI store to be distinct types
  • Make PreKeysStore async
  • AccountManager can update prekey bundles for either PreKeyStore

One thing I disagree with, but don't necessarily want to fix here: set_next_prekey_id sounds like a great source of confusion. In RDBMS-based implementations, the next_prekey_id-family is expected to just query the database and return max+1. Setting a value doesn't make any sense, but the naming of the method implies it should need to be a method with a side effect.

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (1cc7517) 17.21% compared to head (c5b5662) 17.07%.

❗ Current head c5b5662 differs from pull request most recent head e42688c. Consider uploading reports for the commit e42688c to get more accurate results

Files Patch % Lines
libsignal-service/src/push_service.rs 0.00% 23 Missing ⚠️
libsignal-service/src/configuration.rs 0.00% 3 Missing ⚠️
libsignal-service/src/service_address.rs 0.00% 3 Missing ⚠️
libsignal-service/src/pre_keys.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
- Coverage   17.21%   17.07%   -0.15%     
==========================================
  Files          38       38              
  Lines        3073     3099      +26     
==========================================
  Hits          529      529              
- Misses       2544     2570      +26     

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

@rubdos rubdos requested review from gferon and direc85 January 4, 2024 16:02
Copy link
Collaborator

@gferon gferon left a comment

Choose a reason for hiding this comment

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

Let's ship it, I think I had a bit more quality of life improvements to add, but I can do it later! Thanks for this 😄

@rubdos
Copy link
Member Author

rubdos commented Jan 8, 2024

Let's ship it, I think I had a bit more quality of life improvements to add, but I can do it later! Thanks for this 😄

FYI, this is 100% untested. I probably want to ship some more things, but https://gitlab.com/whisperfish/whisperfish/-/merge_requests/530 is on hold currently until after release :'-)

@rubdos
Copy link
Member Author

rubdos commented Jan 14, 2024

(This is more becoming the "let's just implement it damnit" merge request)

@rubdos rubdos mentioned this pull request Jan 14, 2024
6 tasks
@rubdos
Copy link
Member Author

rubdos commented Jan 14, 2024

(This is more becoming the "let's just implement it damnit" merge request)

In order to avoid this, I'll cut this PR short on just some "minor" PNI/ACI refactoring, such that https://gitlab.com/whisperfish/whisperfish/-/merge_requests/530#02abb4bfed1d40529ab2bc6cfe9338119e97be98 is also mergable. Continuation in #285.

@rubdos rubdos enabled auto-merge January 14, 2024 17:28
@rubdos rubdos merged commit 54ce3c4 into main Jan 14, 2024
19 checks passed
@rubdos rubdos deleted the aci-pni-types branch January 14, 2024 17:28
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