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 Initialization & De-Initialization. #398

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

markvdouw
Copy link
Contributor

Fix for Kit Initialization & De-Initializationg.

Instructions

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

Summary

The underlying issues is that when the KitFrameworkManager calls fetchConfig, the kitConfig instance is null (the instance created not yet assigned). Therefore, the ApiClient can get the "supported kits" from the [KitManager.KitIntegrationFactory] and the mp-kit header is not added to the call, resulting in a response with "eks" empty.

The fix includes assigning the KitManager instance before calling configure kits (which will fetch the config).
The kitManager config will anyway be reassigned in the configuration callback.
Removing empty validation in ConfigManager since this is a valid case.

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}

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

Underlying issues is calling fetchConfig when no kit instance is assigned to KitFrameworkManager, therefore the because the instance is null, we cant pass the kits to to apiClient.
Removing empty validation in ConfigManager since this is a valid case.
@markvdouw markvdouw merged commit 42560f1 into development Jul 5, 2023
21 of 23 checks passed
@markvdouw markvdouw deleted the fix/SQDSDKS-5408_config_fix branch July 5, 2023 15:32
mparticle-automation added a commit that referenced this pull request Jul 5, 2023
## [5.51.4](v5.51.3...v5.51.4) (2023-07-05)

### Bug Fixes

* Kit Initialization & De-Initialization. ([#398](#398)) ([42560f1](42560f1))
@mparticle-automation
Copy link
Collaborator

🎉 This PR is included in version 5.51.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@schallock
Copy link

schallock commented Jul 5, 2023

@einsteinx2 @markvdouw I have a tech writing ticket (TW-1204) that was automatically created for this bug - from from what I can tell, there's no actual doc impact. Can I mark my ticket as "won't do", or am I missing something?

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