-
Notifications
You must be signed in to change notification settings - Fork 501
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
CryptoSDK phased rollout feature #7374
Conversation
36c1971
to
1ac1e2a
Compare
Codecov ReportBase: 12.11% // Head: 12.16% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #7374 +/- ##
===========================================
+ Coverage 12.11% 12.16% +0.04%
===========================================
Files 1640 1642 +2
Lines 162133 162195 +62
Branches 66587 66605 +18
===========================================
+ Hits 19643 19729 +86
+ Misses 141843 141820 -23
+ Partials 647 646 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
XCTAssertEqual(variants.count, 5) | ||
XCTAssertTrue(variants.contains(0)) | ||
XCTAssertTrue(variants.contains(1)) | ||
XCTAssertTrue(variants.contains(2)) | ||
XCTAssertTrue(variants.contains(3)) | ||
XCTAssertTrue(variants.contains(4)) | ||
XCTAssertFalse(variants.contains(5)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing these kind of tests could fail under some super unlucky circumstances ? (probably almost never with 10000)
But maybe testing something like variants.isSubset(of: Set<UInt>(0, 1, 2, 3, 4))
makes sense here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea probabilities are always tricky to test deterministically, even the variant.count >= 2
assertion could theoretically fail, though at 10000 samples highly unlikely. Swapped to your suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small suggestion, otherwise LGTM
7561f6c
to
40005fe
Compare
Kudos, SonarCloud Quality Gate passed! |
Implement
CryptoSDKFeature
which combines three different ways to enable the rust-based Crypto SDK:2.0.0
)Given that the migration to CryptoSDK is quite a big change we want to be as careful as possible when automatically converting users to it. Ideally the rate of convertion would be controlled completely remotely, so that we do not have to make new app releases to increase or stop the rollout. We can use
PostHog
for this, however only a subset of users will havePostHog
and analytics enabled, meaning there is a limit to the number of users that can be targetted with the remote feature.To address the remainder of users we rely on local deterministic bucketing based on
userId
, where each bucket represents a single percentage. To determine whether a particular user is included in the current stage of rollout, we interpret their bucket as number between 0% and 100% and compare to the hardcodedtargetPercentage
. To increase target percentage a new app release is required.