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

update Rust for recorded context to handle event store queries #6322

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeddai
Copy link
Member

@jeddai jeddai commented Jul 30, 2024

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • 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 CHANGELOG.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 diligence applied in selecting them.

Branch builds: add [firefox-android: branch-name] to the PR title.

@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 42.03%. Comparing base (c965aab) to head (bd828c8).

Files with missing lines Patch % Lines
components/nimbus/src/targeting.rs 70.00% 3 Missing ⚠️
components/nimbus/src/tests/helpers.rs 90.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (c965aab) and HEAD (bd828c8). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (c965aab) HEAD (bd828c8)
2 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6322      +/-   ##
==========================================
- Coverage   49.30%   42.03%   -7.28%     
==========================================
  Files         146      184      +38     
  Lines       13708    16101    +2393     
==========================================
+ Hits         6759     6768       +9     
- Misses       6949     9333    +2384     
Flag Coverage Δ
42.03% <80.00%> (-7.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jeddai jeddai force-pushed the event-store-recorded-context branch 2 times, most recently from 7884da9 to 507b115 Compare August 5, 2024 16:15
@jeddai jeddai marked this pull request as ready for review August 5, 2024 16:29
@jeddai jeddai requested a review from brennie August 5, 2024 16:29
@jeddai jeddai self-assigned this Aug 5, 2024
@jeddai jeddai added the O(n) Well-scoped logic changes label Aug 5, 2024
@jeddai jeddai force-pushed the event-store-recorded-context branch from 507b115 to e000892 Compare August 5, 2024 20:52
components/nimbus/src/stateful/behavior.rs Outdated Show resolved Hide resolved
components/nimbus/src/stateful/targeting.rs Outdated Show resolved Hide resolved
components/nimbus/src/stateful/behavior.rs Outdated Show resolved Hide resolved
@jeddai jeddai force-pushed the event-store-recorded-context branch 3 times, most recently from 766b1f0 to 024e66f Compare September 26, 2024 20:04
components/nimbus/src/stateful/behavior.rs Show resolved Hide resolved
components/nimbus/src/stateful/nimbus_client.rs Outdated Show resolved Hide resolved
components/nimbus/src/stateful/targeting.rs Outdated Show resolved Hide resolved
components/nimbus/src/targeting.rs Outdated Show resolved Hide resolved
components/nimbus/src/targeting.rs Outdated Show resolved Hide resolved
components/nimbus/src/tests/helpers.rs Outdated Show resolved Hide resolved
components/nimbus/src/tests/stateful/test_nimbus.rs Outdated Show resolved Hide resolved
Comment on lines +167 to +169
let targeting_helper = self.create_targeting_helper_with_context(serde_json::to_value(
state.targeting_attributes.clone(),
)?);
Copy link
Member

Choose a reason for hiding this comment

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

You don't need to clone, since there is a blanket impl for &T where T: Serialize

Suggested change
let targeting_helper = self.create_targeting_helper_with_context(serde_json::to_value(
state.targeting_attributes.clone(),
)?);
let targeting_helper = self.create_targeting_helper_with_context(serde_json::to_value(
&state.targeting_attributest,
)?);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O(n) Well-scoped logic changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants