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: implement transaction [WPB-11400] [WPB-10917] #732

Open
wants to merge 79 commits into
base: main
Choose a base branch
from

Conversation

SimonThormeyer
Copy link
Contributor

What's new in this PR


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.

@echoes-hq echoes-hq bot added the echoes: features End-user visible changes intended to create customer value label Oct 23, 2024
@SimonThormeyer SimonThormeyer force-pushed the feat/transaction branch 2 times, most recently from 1f1ae57 to 77ca951 Compare October 24, 2024 06:51
@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 58.60450% with 1234 lines in your changes missing coverage. Please review.

Project coverage is 72.15%. Comparing base (b5f0e7a) to head (82b335e).

Files with missing lines Patch % Lines
crypto-ffi/src/generic/context/mod.rs 0.00% 360 Missing ⚠️
crypto-ffi/src/generic/mod.rs 0.00% 320 Missing ⚠️
crypto-ffi/src/generic/context/e2ei.rs 0.00% 183 Missing ⚠️
crypto/src/mls/conversation/commit.rs 82.73% 67 Missing ⚠️
crypto-ffi/src/generic/context/proteus.rs 0.00% 64 Missing ⚠️
crypto/src/e2e_identity/init_certificates.rs 61.76% 52 Missing ⚠️
crypto/src/e2e_identity/conversation_state.rs 81.14% 33 Missing ⚠️
crypto/src/e2e_identity/rotate.rs 89.61% 30 Missing ⚠️
crypto/src/mls/conversation/decrypt.rs 93.00% 30 Missing ⚠️
crypto/src/mls/conversation/db_count.rs 7.14% 26 Missing ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #732      +/-   ##
==========================================
- Coverage   76.19%   72.15%   -4.05%     
==========================================
  Files          99      104       +5     
  Lines       19608    19689      +81     
==========================================
- Hits        14941    14207     -734     
- Misses       4667     5482     +815     
Files with missing lines Coverage Δ
crypto-attributes/src/lib.rs 87.17% <ø> (ø)
crypto-ffi/src/lib.rs 0.00% <ø> (ø)
crypto/src/e2e_identity/refresh_token.rs 100.00% <100.00%> (ø)
crypto/src/e2e_identity/stash.rs 93.47% <100.00%> (+0.07%) ⬆️
crypto/src/error.rs 23.80% <ø> (ø)
crypto/src/lib.rs 37.50% <ø> (-37.50%) ⬇️
crypto/src/mls/buffer_external_commit.rs 87.67% <100.00%> (+1.44%) ⬆️
crypto/src/mls/client/id.rs 59.25% <ø> (ø)
crypto/src/mls/conversation/buffer_messages.rs 90.21% <100.00%> (+1.65%) ⬆️
crypto/src/mls/conversation/commit_delay.rs 91.66% <100.00%> (+0.92%) ⬆️
... and 75 more

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 b5f0e7a...82b335e. Read the comment docs.

@SimonThormeyer SimonThormeyer force-pushed the feat/transaction branch 26 times, most recently from 01f4f8c to b9afcf6 Compare October 25, 2024 12:49
And mark corresponding methods on CoreCrypto as deprecated
The SQLite in-memory instance is initiated with an empty path string, which had lead to empty query results in the iOS-specific keychain interactions.
This includes removal of the mls-keystore cargo feature
This will allow us to drop the deprecated API part in wasm bindings
...when catching an error during a transaction
To make the error thrown by the wrapper consistent with the ones before the transaction feature.
}
})
if (error != null) {
throw error as Throwable
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a test for this?

});
if (error !== null) {
throw error;
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a test for this?

return error;
});

expect(error.rustStackTrace).toBe("CryptoError(InvalidContext)");
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for this test! 💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: features End-user visible changes intended to create customer value
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants