-
Notifications
You must be signed in to change notification settings - Fork 411
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: Support transient identities and traits #4325
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
|
|
|
|
|
f82a97f
to
a47b4bc
Compare
Uffizzi Preview |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4325 +/- ##
==========================================
+ Coverage 96.61% 96.78% +0.17%
==========================================
Files 1196 1159 -37
Lines 39123 38152 -971
==========================================
- Hits 37797 36925 -872
+ Misses 1326 1227 -99 ☔ View full report in Codecov by Sentry. |
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've added a few fairly minor comments, but one additional thing that (I think) is missing, is a test that verifies that transient traits are correctly used when evaluating segments / segment overrides. Maybe this is implicit from other tests but I certainly expected to see an explicit test for this case.
api/tests/unit/environments/identities/test_unit_identities_models.py
Outdated
Show resolved
Hide resolved
api/tests/unit/environments/identities/test_unit_identities_views.py
Outdated
Show resolved
Hide resolved
api/tests/unit/environments/identities/test_unit_identities_views.py
Outdated
Show resolved
Hide resolved
api/tests/unit/environments/identities/test_unit_identities_views.py
Outdated
Show resolved
Hide resolved
api/tests/unit/environments/identities/traits/test_unit_traits_serializers.py
Show resolved
Hide resolved
Docker builds report
|
815b6e3
to
3929b2d
Compare
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
Closes #4279.
Contributes to #4278.
This adds support for
transient
parametertransient
attribute for traitsfor the
/api/v1/identities
SDK endpoint (GET, POST).When including top-level
transient: true
, identity is evaluated against segments but is not persisted at all.When calling the endpoint with traits marked as transient, these traits get evaluated against segments but do not get persisted.
Additionally,
Identity.update_traits
does not perform twoSELECT
queries anymore.How did you test this code?
Added unit tests for views and serializers.