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

feat: use entity derive macros for tables with hex ids [WPB-15434] #904

Merged

Conversation

SimonThormeyer
Copy link
Contributor

@SimonThormeyer SimonThormeyer commented Feb 4, 2025

What's new in this PR

Subtask of the above item, creating a separate PR to avoid large changeset


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.

Copy link

github-actions bot commented Feb 4, 2025

🐰 Bencher Report

Branchsimon/feat/entity-derive-macro-second-iteration
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencymilliseconds (ms)
Commit add f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
19.60
Commit add f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6.88
Commit add f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
9.60
Commit add f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
11.96
Commit add f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
14.85
Commit add f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
17.53
Commit add f(number clients)/cs1/mem/1002📈 view plot
🚷 view threshold
990.26
Commit add f(number clients)/cs1/mem/2📈 view plot
🚷 view threshold
6.97
Commit add f(number clients)/cs1/mem/202📈 view plot
🚷 view threshold
85.14
Commit add f(number clients)/cs1/mem/402📈 view plot
🚷 view threshold
221.84
Commit add f(number clients)/cs1/mem/602📈 view plot
🚷 view threshold
428.83
Commit add f(number clients)/cs1/mem/802📈 view plot
🚷 view threshold
676.59
Commit pending proposals f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
116.74
Commit pending proposals f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
28.55
Commit pending proposals f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
45.81
Commit pending proposals f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
60.96
Commit pending proposals f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
79.81
Commit pending proposals f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
94.69
Commit pending proposals f(pending size)/cs1/mem/1📈 view plot
🚷 view threshold
19.12
Commit pending proposals f(pending size)/cs1/mem/101📈 view plot
🚷 view threshold
115.40
Commit pending proposals f(pending size)/cs1/mem/21📈 view plot
🚷 view threshold
35.95
Commit pending proposals f(pending size)/cs1/mem/41📈 view plot
🚷 view threshold
57.37
Commit pending proposals f(pending size)/cs1/mem/61📈 view plot
🚷 view threshold
75.86
Commit pending proposals f(pending size)/cs1/mem/81📈 view plot
🚷 view threshold
98.69
Commit remove f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
28.99
Commit remove f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
6.78
Commit remove f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
9.02
Commit remove f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
12.06
Commit remove f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
17.86
Commit remove f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
23.38
Commit remove f(number clients)/cs1/mem/1002📈 view plot
🚷 view threshold
33.07
Commit remove f(number clients)/cs1/mem/2📈 view plot
🚷 view threshold
138.03
Commit remove f(number clients)/cs1/mem/202📈 view plot
🚷 view threshold
115.86
Commit remove f(number clients)/cs1/mem/402📈 view plot
🚷 view threshold
94.14
Commit remove f(number clients)/cs1/mem/602📈 view plot
🚷 view threshold
73.07
Commit remove f(number clients)/cs1/mem/802📈 view plot
🚷 view threshold
51.85
Commit update f(group size)/cs1/mem/1002📈 view plot
🚷 view threshold
137.46
Commit update f(group size)/cs1/mem/2📈 view plot
🚷 view threshold
7.19
Commit update f(group size)/cs1/mem/202📈 view plot
🚷 view threshold
33.81
Commit update f(group size)/cs1/mem/402📈 view plot
🚷 view threshold
59.64
Commit update f(group size)/cs1/mem/602📈 view plot
🚷 view threshold
87.02
Commit update f(group size)/cs1/mem/802📈 view plot
🚷 view threshold
112.10
🐰 View full continuous benchmarking report in Bencher

@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 88.10811% with 22 lines in your changes missing coverage. Please review.

Project coverage is 78.21%. Comparing base (1bece57) to head (1afca7d).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
crypto-macros/src/entity_derive/parse.rs 73.21% 15 Missing ⚠️
crypto-macros/src/entity_derive/derive_impl.rs 94.44% 6 Missing ⚠️
keystore/src/lib.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #904      +/-   ##
==========================================
- Coverage   78.40%   78.21%   -0.19%     
==========================================
  Files         113      111       -2     
  Lines       20166    19971     -195     
==========================================
- Hits        15811    15621     -190     
+ Misses       4355     4350       -5     
Files with missing lines Coverage Δ
crypto-macros/src/entity_derive/mod.rs 100.00% <100.00%> (ø)
keystore/src/entities/mls.rs 66.66% <100.00%> (ø)
...eystore/src/entities/platform/generic/mls/group.rs 0.00% <ø> (-68.00%) ⬇️
keystore/src/error.rs 0.00% <ø> (ø)
keystore/src/transaction/dynamic_dispatch.rs 92.59% <100.00%> (+0.06%) ⬆️
keystore/src/lib.rs 24.24% <0.00%> (ø)
crypto-macros/src/entity_derive/derive_impl.rs 98.44% <94.44%> (-1.56%) ⬇️
crypto-macros/src/entity_derive/parse.rs 82.69% <73.21%> (-4.59%) ⬇️

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 1bece57...1afca7d. Read the comment docs.

keystore/src/error.rs Show resolved Hide resolved
keystore/src/error.rs Outdated Show resolved Hide resolved
@SimonThormeyer SimonThormeyer force-pushed the simon/feat/entity-derive-macro-second-iteration branch 5 times, most recently from f57660e to 1192318 Compare February 5, 2025 08:52
There is no obvious reason to give it another name than the
 struct. So rename it for parity with the struct name.
There is no obvious reason to give it another name than the
struct here, either. So rename it for parity with the struct name.
For parity with the wrapped struct. This makes it compatible with the new
derive macro.
@SimonThormeyer SimonThormeyer force-pushed the simon/feat/entity-derive-macro-second-iteration branch from 1192318 to 8809379 Compare February 5, 2025 08:59
@SimonThormeyer SimonThormeyer marked this pull request as ready for review February 5, 2025 09:11
@SimonThormeyer SimonThormeyer requested a review from a team as a code owner February 5, 2025 09:11
Copy link
Contributor

@coriolinus coriolinus left a comment

Choose a reason for hiding this comment

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

Looks good! I only manually looked over the derived implementations for PersistedMlsGroup, but that one seemed very reasonable.

crypto-macros/src/entity_derive/parse.rs Outdated Show resolved Hide resolved
@SimonThormeyer SimonThormeyer force-pushed the simon/feat/entity-derive-macro-second-iteration branch from 8809379 to 1afca7d Compare February 5, 2025 10:00
@SimonThormeyer SimonThormeyer merged commit 1afca7d into main Feb 5, 2025
38 checks passed
@SimonThormeyer SimonThormeyer deleted the simon/feat/entity-derive-macro-second-iteration branch February 5, 2025 10:53
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.

3 participants