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

Nimbus: Add EventCount store to persistence layer #5206

Merged

Conversation

travis79
Copy link
Member

This store will hold the data collected around the user behavior that will be used for the purpose of targeting and message triggers.

Pull Request checklist

  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGES_UNRELEASED.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due dilligence applied in selecting them.

Branch builds: add [ac: android-components-branch-name] and/or [fenix: fenix-branch-name] to the PR title.

@travis79 travis79 force-pushed the travis/behavior-targeting-persistence branch 2 times, most recently from 8bc3f32 to 301e23f Compare October 31, 2022 17:25
@travis79 travis79 requested a review from jeddai October 31, 2022 17:26
@travis79 travis79 marked this pull request as ready for review October 31, 2022 17:26
@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2022

Codecov Report

Base: 41.70% // Head: 41.89% // Increases project coverage by +0.18% 🎉

Coverage data is based on head (4e2c283) compared to base (f1276e4).
Patch coverage: 79.36% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5206      +/-   ##
==========================================
+ Coverage   41.70%   41.89%   +0.18%     
==========================================
  Files         173      173              
  Lines       13204    13267      +63     
==========================================
+ Hits         5507     5558      +51     
- Misses       7697     7709      +12     
Impacted Files Coverage Δ
components/nimbus/src/lib.rs 64.47% <33.33%> (-0.68%) ⬇️
components/nimbus/src/behavior.rs 94.07% <84.78%> (-1.45%) ⬇️
components/nimbus/src/persistence.rs 93.90% <100.00%> (+0.22%) ⬆️

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@travis79 travis79 force-pushed the travis/behavior-targeting-persistence branch from 57a368b to a808e6a Compare November 2, 2022 20:29
Copy link
Member

@jeddai jeddai left a comment

Choose a reason for hiding this comment

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

I think it looks good!

@travis79 travis79 force-pushed the travis/behavior-targeting-persistence branch from a808e6a to 98f9c2a Compare November 3, 2022 16:00
Copy link
Contributor

@tarikeshaq tarikeshaq left a comment

Choose a reason for hiding this comment

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

Had a quick look, I have limited insights into how this all should work but commented on the I/O in the new function and a couple of nits!

Only putting Request Changes for the I/O, feel free to push back if we're confident that wouldn't cause any blocking of the main thread!

components/nimbus/src/behavior.rs Show resolved Hide resolved
components/nimbus/src/behavior.rs Outdated Show resolved Hide resolved
components/nimbus/src/lib.rs Outdated Show resolved Hide resolved
components/nimbus/src/behavior.rs Outdated Show resolved Hide resolved
@travis79 travis79 force-pushed the travis/behavior-targeting-persistence branch from 98f9c2a to 4e2c283 Compare November 4, 2022 00:06
Copy link
Contributor

@tarikeshaq tarikeshaq left a comment

Choose a reason for hiding this comment

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

lgtm 🚢 ! Thank you for making the changes!

jeddai and others added 3 commits November 4, 2022 07:35
This store will hold the data collected around the user behavior that will be used for the purpose of targeting and message triggers.
- Updates to behavior.rs to make it serializable/deserializable
- Add event_store to NimbusClient and and read persisted data on init
@travis79 travis79 force-pushed the travis/behavior-targeting-persistence branch from 4e2c283 to ff4cd3a Compare November 4, 2022 12:35
@travis79 travis79 merged commit a07a3b7 into mozilla:main Nov 4, 2022
@travis79 travis79 deleted the travis/behavior-targeting-persistence branch November 4, 2022 13:26
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.

4 participants