Skip to content

RUM-4098: Add api to clear all datastore data#2096

Merged
jonathanmos merged 2 commits into
developfrom
jmoskovich/rum-4098/add-clear-datastore-api
Jun 30, 2024
Merged

RUM-4098: Add api to clear all datastore data#2096
jonathanmos merged 2 commits into
developfrom
jmoskovich/rum-4098/add-clear-datastore-api

Conversation

@jonathanmos

Copy link
Copy Markdown
Member

What does this PR do?

Adds an api to delete all saved datastore entries.

Motivation

The core's clearAllData api should return the sdk to a fresh state and therefore requires removal of datastore information.

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-4098/add-clear-datastore-api branch from 10e7f4c to 9379f41 Compare June 20, 2024 13:53
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-4098/sessionreplay-datastore branch from 6436ddc to 91c43fb Compare June 20, 2024 14:33
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-4098/add-clear-datastore-api branch from 9379f41 to 2f10a34 Compare June 20, 2024 14:43
@codecov-commenter

codecov-commenter commented Jun 23, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 42.85714% with 8 lines in your changes missing coverage. Please review.

Project coverage is 69.70%. Comparing base (4641fbf) to head (7286345).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2096      +/-   ##
===========================================
+ Coverage    69.65%   69.70%   +0.06%     
===========================================
  Files          718      718              
  Lines        26650    26686      +36     
  Branches      4466     4474       +8     
===========================================
+ Hits         18561    18601      +40     
+ Misses        6875     6864      -11     
- Partials      1214     1221       +7     
Files Coverage Δ
.../android/api/storage/datastore/DataStoreHandler.kt 40.00% <ø> (+20.00%) ⬆️
...in/com/datadog/android/core/internal/SdkFeature.kt 90.91% <100.00%> (+0.05%) ⬆️
...rnal/persistence/datastore/NoOpDataStoreHandler.kt 100.00% <ø> (ø)
...ernal/persistence/datastore/DatastoreFileWriter.kt 84.75% <80.00%> (-0.44%) ⬇️
.../android/core/internal/persistence/file/FileExt.kt 87.93% <50.00%> (-1.35%) ⬇️
...rnal/persistence/datastore/DataStoreFileHandler.kt 84.62% <0.00%> (-15.38%) ⬇️
...ernal/persistence/datastore/DataStoreFileHelper.kt 15.00% <0.00%> (-2.65%) ⬇️

... and 27 files with indirect coverage changes

@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-4098/add-clear-datastore-api branch from 2f10a34 to 95ec2df Compare June 24, 2024 08:15
@jonathanmos
jonathanmos marked this pull request as ready for review June 24, 2024 08:54
@jonathanmos
jonathanmos requested review from a team as code owners June 24, 2024 08:54
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-4098/sessionreplay-datastore branch from bc635ab to 2e2c6f1 Compare June 25, 2024 13:06
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-4098/add-clear-datastore-api branch 2 times, most recently from 640a71f to 4ce6a5e Compare June 26, 2024 13:02
@jonathanmos
jonathanmos requested review from 0xnm and mariusc83 June 26, 2024 15:57
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-4098/sessionreplay-datastore branch 6 times, most recently from fa9f3b1 to 4641fbf Compare June 27, 2024 14:07
@jonathanmos
jonathanmos force-pushed the jmoskovich/rum-4098/add-clear-datastore-api branch from 07dbe6c to 7286345 Compare June 27, 2024 14:46
Base automatically changed from jmoskovich/rum-4098/sessionreplay-datastore to develop June 27, 2024 15:02
@jonathanmos
jonathanmos merged commit eaa15cd into develop Jun 30, 2024
@jonathanmos
jonathanmos deleted the jmoskovich/rum-4098/add-clear-datastore-api branch June 30, 2024 08:20
@xgouchet xgouchet added this to the 2.12.x milestone Jul 31, 2024
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.

5 participants