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

[SDK-2485] Remove cached events #1226

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

gdeluna-branch
Copy link
Contributor

@gdeluna-branch gdeluna-branch commented Oct 16, 2024

Reference

SDK-2488 -- [Android] [Spike] Factor out persisted events/ In-memory only execution

Description

Behavior between the iOS and Android SDKs concerning what to do with "cached events" has been inconsistent and has led to undesirable behavior. This PR simply removes the notion of cached events, which are read from disk only when the Branch Singleton instance is initialized.

Events that fail during app foreground (no internet, failed server request) are not stored and are thus lost, never persisted to the disk. Further, only opens were able to be serialized. #1215

v1/url was serialized, but never replayed.

Background processing of events is not yet in scope.

Keeping utility function as other unrelated tests have a dependency on manually creating ServerRequest objects.

Testing Instructions

Prior behavior: open events will be added to the queue and persisted. Immediately background and close the app before the network request is executed and the request will be replayed.

After: SDK skips this steps and proceeds to process new open request, by design.

Risk Assessment [LOW]

  • I, the PR creator, have tested — integration, unit, or otherwise — this code.

Reviewer Checklist (To be checked off by the reviewer only)

  • JIRA Ticket is referenced in PR title.
  • Correctness & Style
    • Conforms to AOSP Style Guides
    • Mission critical pieces are documented in code and out of code as needed.
  • Unit Tests reviewed and test issue sufficiently.
  • Functionality was reviewed in QA independently by another engineer on the team.

cc @BranchMetrics/saas-sdk-devs for visibility.

Copy link
Contributor

@NidhiDixit09 NidhiDixit09 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

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.

2 participants