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

fix: Kit integration forwarding unplanned/blocked events when fired early on app run #394

Merged
merged 4 commits into from
Jun 28, 2023

Conversation

markvdouw
Copy link
Contributor

Kit integration forwarding unplanned/blocked events when fired early on app run

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https:/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https:/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

  • Dataplans was being updated before the config has been loaded, resulting on a race condition.

Testing Plan

  • Was this tested locally? If not, explain why.
  • {explain how this has been tested, and what, if any, additional testing should be done}
    @mmustafa-tse was able to verify the fix.

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@@ -77,12 +77,13 @@ public void loadKitLibrary() {
.onKitsLoaded(() -> {
mKitManager = kitManager;
setKitsLoaded(true);
updateDataplan(mCoreCallbacks.getDataplanOptions());
Copy link
Member

Choose a reason for hiding this comment

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

this reads like a race condition - we need to ensure that the data plan is set before kits are loaded. specifically - we need to make sure that no user attribute, events, etc can be sent to kits prior to the data plan.

in my view ideally we'd load the data plan in the same function updateKits above that loads kit configuration. the idea of KitConfiguration is that it should contain absolutely everything needed, and we only start kits after it's been completely parsed.

Copy link
Contributor

@BrandonStalnaker BrandonStalnaker left a comment

Choose a reason for hiding this comment

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

LGTM

@markvdouw markvdouw merged commit b99a1c6 into development Jun 28, 2023
@markvdouw markvdouw deleted the fix/SQDSDKS-5508_dataplan_filtering branch June 28, 2023 17:26
mparticle-automation added a commit that referenced this pull request Jun 28, 2023
## [5.51.3](v5.51.2...v5.51.3) (2023-06-28)

### Bug Fixes

* Fixing initialization & de-initialization issue on kits. ([#393](#393)) ([d02b5b3](d02b5b3))
* Kit integration forwarding unplanned/blocked events when fired early on app run ([#394](#394)) ([b99a1c6](b99a1c6))

### Updates & Maintenance

* Update submodules ([1ba89e3](1ba89e3))
@mparticle-automation
Copy link
Collaborator

🎉 This PR is included in version 5.51.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants