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

refactor: move proteus errors to it's own top level error #761

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

typfel
Copy link
Member

@typfel typfel commented Nov 13, 2024

What's new in this PR

Moving proteus errors to it's own error struct lets us create more detailed proteus errors, which in turn will allow us to remove the proteus_code hack.


PR Submission Checklist for internal contributors
  • The PR Title
    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@typfel typfel force-pushed the refactor/proteus-errors branch 2 times, most recently from 3409dd3 to 50cbaa8 Compare November 13, 2024 16:15
@codecov-commenter
Copy link

codecov-commenter commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 13.65188% with 253 lines in your changes missing coverage. Please review.

Project coverage is 71.72%. Comparing base (ac0d5f9) to head (b05ef18).

Files with missing lines Patch % Lines
crypto-ffi/src/generic/mod.rs 0.00% 160 Missing ⚠️
crypto/src/proteus.rs 28.73% 62 Missing ⚠️
crypto-ffi/src/generic/context/mod.rs 0.00% 15 Missing ⚠️
crypto/src/context.rs 47.61% 11 Missing ⚠️
crypto/src/group_store.rs 50.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #761      +/-   ##
==========================================
- Coverage   72.12%   71.72%   -0.40%     
==========================================
  Files         106      106              
  Lines       19718    19822     +104     
==========================================
- Hits        14222    14218       -4     
- Misses       5496     5604     +108     
Files with missing lines Coverage Δ
crypto-ffi/src/lib.rs 0.00% <ø> (ø)
crypto/src/error.rs 71.42% <ø> (+47.61%) ⬆️
crypto/src/lib.rs 37.50% <ø> (ø)
crypto/src/group_store.rs 70.14% <50.00%> (ø)
crypto/src/context.rs 72.72% <47.61%> (-0.75%) ⬇️
crypto-ffi/src/generic/context/mod.rs 0.00% <0.00%> (ø)
crypto/src/proteus.rs 52.18% <28.73%> (-1.17%) ⬇️
crypto-ffi/src/generic/mod.rs 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac0d5f9...b05ef18. Read the comment docs.

Copy link

github-actions bot commented Nov 13, 2024

🐰 Bencher Report

Branchrefactor/proteus-errors
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
Commit add f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
18,368,000.00
Commit add f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6,750,300.00
Commit add f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
9,275,500.00
Commit add f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
11,537,000.00
Commit add f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
15,188,000.00
Commit add f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
16,534,000.00
Commit add f(number clients)/cs1/mem/1002📈 view plot
🚷 view threshold
981,070,000.00
Commit add f(number clients)/cs1/mem/2📈 view plot
🚷 view threshold
6,815,200.00
Commit add f(number clients)/cs1/mem/202📈 view plot
🚷 view threshold
83,613,000.00
Commit add f(number clients)/cs1/mem/402📈 view plot
🚷 view threshold
217,140,000.00
Commit add f(number clients)/cs1/mem/602📈 view plot
🚷 view threshold
424,720,000.00
Commit add f(number clients)/cs1/mem/802📈 view plot
🚷 view threshold
670,440,000.00
Commit pending proposals f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
115,950,000.00
Commit pending proposals f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
28,557,000.00
Commit pending proposals f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
45,422,000.00
Commit pending proposals f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
60,699,000.00
Commit pending proposals f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
79,293,000.00
Commit pending proposals f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
94,002,000.00
Commit pending proposals f(pending size)/cs1/mem/1📈 view plot
🚷 view threshold
18,164,000.00
Commit pending proposals f(pending size)/cs1/mem/101📈 view plot
🚷 view threshold
114,790,000.00
Commit pending proposals f(pending size)/cs1/mem/21📈 view plot
🚷 view threshold
34,664,000.00
Commit pending proposals f(pending size)/cs1/mem/41📈 view plot
🚷 view threshold
55,825,000.00
Commit pending proposals f(pending size)/cs1/mem/61📈 view plot
🚷 view threshold
74,858,000.00
Commit pending proposals f(pending size)/cs1/mem/81📈 view plot
🚷 view threshold
94,818,000.00
Commit remove f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
27,913,000.00
Commit remove f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6,604,900.00
Commit remove f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
9,394,800.00
Commit remove f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
12,317,000.00
Commit remove f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
16,973,000.00
Commit remove f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
21,933,000.00
Commit remove f(number clients)/cs1/mem/1002📈 view plot
🚷 view threshold
30,166,000.00
Commit remove f(number clients)/cs1/mem/2📈 view plot
🚷 view threshold
136,040,000.00
Commit remove f(number clients)/cs1/mem/202📈 view plot
🚷 view threshold
113,700,000.00
Commit remove f(number clients)/cs1/mem/402📈 view plot
🚷 view threshold
92,776,000.00
Commit remove f(number clients)/cs1/mem/602📈 view plot
🚷 view threshold
71,460,000.00
Commit remove f(number clients)/cs1/mem/802📈 view plot
🚷 view threshold
50,968,000.00
Commit update f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
135,980,000.00
Commit update f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6,698,700.00
Commit update f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
33,085,000.00
Commit update f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
58,978,000.00
Commit update f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
85,869,000.00
Commit update f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
110,490,000.00
Count KeyPackage/cs1/mem/1002📈 view plot
🚷 view threshold
10,295,000.00
Count KeyPackage/cs1/mem/2📈 view plot
🚷 view threshold
6,327,400.00
Count KeyPackage/cs1/mem/202📈 view plot
🚷 view threshold
7,006,400.00
Count KeyPackage/cs1/mem/402📈 view plot
🚷 view threshold
8,195,500.00
Count KeyPackage/cs1/mem/602📈 view plot
🚷 view threshold
8,741,900.00
Count KeyPackage/cs1/mem/802📈 view plot
🚷 view threshold
9,150,800.00
Create group/cs1/mem📈 view plot
🚷 view threshold
6,815,700.00
Decrypt f(msg size)/cs1/mem/10📈 view plot
🚷 view threshold
6,152,700.00
Decrypt f(msg size)/cs1/mem/10010📈 view plot
🚷 view threshold
6,407,900.00
Decrypt f(msg size)/cs1/mem/2010📈 view plot
🚷 view threshold
6,188,200.00
Decrypt f(msg size)/cs1/mem/4010📈 view plot
🚷 view threshold
6,153,100.00
Decrypt f(msg size)/cs1/mem/6010📈 view plot
🚷 view threshold
6,235,900.00
Decrypt f(msg size)/cs1/mem/8010📈 view plot
🚷 view threshold
6,226,600.00
Encrypt f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
8,891,000.00
Encrypt f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6,230,900.00
Encrypt f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
7,022,600.00
Encrypt f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
7,463,300.00
Encrypt f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
7,611,300.00
Encrypt f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
8,193,100.00
Encrypt f(msg size)/cs1/mem/10📈 view plot
🚷 view threshold
8,738,600.00
Encrypt f(msg size)/cs1/mem/10010📈 view plot
🚷 view threshold
8,738,900.00
Encrypt f(msg size)/cs1/mem/2010📈 view plot
🚷 view threshold
9,012,800.00
Encrypt f(msg size)/cs1/mem/4010📈 view plot
🚷 view threshold
8,880,600.00
Encrypt f(msg size)/cs1/mem/6010📈 view plot
🚷 view threshold
8,818,400.00
Encrypt f(msg size)/cs1/mem/8010📈 view plot
🚷 view threshold
8,836,200.00
Generate KeyPackage f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
241,380,000.00
Generate KeyPackage f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6,401,100.00
Generate KeyPackage f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
32,930,000.00
Generate KeyPackage f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
85,620,000.00
Generate KeyPackage f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
137,190,000.00
Generate KeyPackage f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
191,300,000.00
Join from external commit f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
243,280,000.00
Join from external commit f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
7,837,800.00
Join from external commit f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
55,008,000.00
Join from external commit f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
102,500,000.00
Join from external commit f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
150,010,000.00
Join from external commit f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
197,250,000.00
Join from welcome f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
111,600,000.00
Join from welcome f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6,996,600.00
Join from welcome f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
27,957,000.00
Join from welcome f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
49,045,000.00
Join from welcome f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
69,796,000.00
Join from welcome f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
90,487,000.00
Mls vs Proteus: add/MLS/mem/1📈 view plot
🚷 view threshold
6,806,200.00
Mls vs Proteus: add/MLS/mem/101📈 view plot
🚷 view threshold
7,974,100.00
Mls vs Proteus: add/MLS/mem/21📈 view plot
🚷 view threshold
7,000,000.00
Mls vs Proteus: add/MLS/mem/41📈 view plot
🚷 view threshold
7,278,400.00
Mls vs Proteus: add/MLS/mem/61📈 view plot
🚷 view threshold
7,512,000.00
Mls vs Proteus: add/MLS/mem/81📈 view plot
🚷 view threshold
7,717,700.00
Mls vs Proteus: add/Proteus/mem/1📈 view plot
🚷 view threshold
6,377,100.00
Mls vs Proteus: add/Proteus/mem/101📈 view plot
🚷 view threshold
44,534,000.00
Mls vs Proteus: add/Proteus/mem/21📈 view plot
🚷 view threshold
13,908,000.00
Mls vs Proteus: add/Proteus/mem/41📈 view plot
🚷 view threshold
21,466,000.00
Mls vs Proteus: add/Proteus/mem/61📈 view plot
🚷 view threshold
29,309,000.00
Mls vs Proteus: add/Proteus/mem/81📈 view plot
🚷 view threshold
36,687,000.00
Mls vs Proteus: encrypt/MLS/mem/1📈 view plot
🚷 view threshold
6,285,000.00
Mls vs Proteus: encrypt/MLS/mem/101📈 view plot
🚷 view threshold
6,739,400.00
Mls vs Proteus: encrypt/MLS/mem/21📈 view plot
🚷 view threshold
6,385,700.00
Mls vs Proteus: encrypt/MLS/mem/41📈 view plot
🚷 view threshold
6,420,700.00
Mls vs Proteus: encrypt/MLS/mem/61📈 view plot
🚷 view threshold
6,428,800.00
Mls vs Proteus: encrypt/MLS/mem/81📈 view plot
🚷 view threshold
6,520,400.00
Mls vs Proteus: encrypt/Proteus/mem/1📈 view plot
🚷 view threshold
5,997,900.00
Mls vs Proteus: encrypt/Proteus/mem/101📈 view plot
🚷 view threshold
15,898,000.00
Mls vs Proteus: encrypt/Proteus/mem/21📈 view plot
🚷 view threshold
8,391,200.00
Mls vs Proteus: encrypt/Proteus/mem/41📈 view plot
🚷 view threshold
10,216,000.00
Mls vs Proteus: encrypt/Proteus/mem/61📈 view plot
🚷 view threshold
11,887,000.00
Mls vs Proteus: encrypt/Proteus/mem/81📈 view plot
🚷 view threshold
14,726,000.00
Mls vs Proteus: remove/MLS/mem/1📈 view plot
🚷 view threshold
20,085,000.00
Mls vs Proteus: remove/MLS/mem/101📈 view plot
🚷 view threshold
8,094,100.00
Mls vs Proteus: remove/MLS/mem/21📈 view plot
🚷 view threshold
17,499,000.00
Mls vs Proteus: remove/MLS/mem/41📈 view plot
🚷 view threshold
15,267,000.00
Mls vs Proteus: remove/MLS/mem/61📈 view plot
🚷 view threshold
12,664,000.00
Mls vs Proteus: remove/MLS/mem/81📈 view plot
🚷 view threshold
10,316,000.00
Mls vs Proteus: remove/Proteus/mem/1📈 view plot
🚷 view threshold
5,976,600.00
Mls vs Proteus: remove/Proteus/mem/101📈 view plot
🚷 view threshold
7,352,400.00
Mls vs Proteus: remove/Proteus/mem/21📈 view plot
🚷 view threshold
6,364,800.00
Mls vs Proteus: remove/Proteus/mem/41📈 view plot
🚷 view threshold
6,629,300.00
Mls vs Proteus: remove/Proteus/mem/61📈 view plot
🚷 view threshold
7,208,500.00
Mls vs Proteus: remove/Proteus/mem/81📈 view plot
🚷 view threshold
6,830,900.00
Mls vs Proteus: update/MLS/mem/1📈 view plot
🚷 view threshold
6,843,100.00
Mls vs Proteus: update/MLS/mem/101📈 view plot
🚷 view threshold
20,097,000.00
Mls vs Proteus: update/MLS/mem/21📈 view plot
🚷 view threshold
9,488,700.00
Mls vs Proteus: update/MLS/mem/41📈 view plot
🚷 view threshold
12,248,000.00
Mls vs Proteus: update/MLS/mem/61📈 view plot
🚷 view threshold
14,948,000.00
Mls vs Proteus: update/MLS/mem/81📈 view plot
🚷 view threshold
17,642,000.00
Mls vs Proteus: update/Proteus/mem/1📈 view plot
🚷 view threshold
6,306,300.00
Mls vs Proteus: update/Proteus/mem/101📈 view plot
🚷 view threshold
46,099,000.00
Mls vs Proteus: update/Proteus/mem/21📈 view plot
🚷 view threshold
14,337,000.00
Mls vs Proteus: update/Proteus/mem/41📈 view plot
🚷 view threshold
22,153,000.00
Mls vs Proteus: update/Proteus/mem/61📈 view plot
🚷 view threshold
30,164,000.00
Mls vs Proteus: update/Proteus/mem/81📈 view plot
🚷 view threshold
38,400,000.00
🐰 View full continuous benchmarking report in Bencher

@typfel typfel force-pushed the refactor/proteus-errors branch 2 times, most recently from cf99aad to 6af63f1 Compare November 14, 2024 09:30
Moving proteus errors to it's own error struct lets  us create more detailed
proteus errors, which in turn will allow us to remove the proteus_code hack.
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