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

RUM-4098: Add TLVFormat DataStore persistence #2038

Merged
merged 14 commits into from
Jun 24, 2024

Conversation

jonathanmos
Copy link
Member

@jonathanmos jonathanmos commented May 16, 2024

What does this PR do?

Adds the capability to write/read files in TLVformat, and defines a DataStore type that features can use to persist data between sessions.

Motivation

Part of the effort to persist bitmap hashes between sessions. Integrating the datastore with SR will be in a second PR.

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-persistence branch 6 times, most recently from 410e07f to 4d6dc78 Compare May 20, 2024 13:04
@codecov-commenter
Copy link

codecov-commenter commented May 21, 2024

Codecov Report

Attention: Patch coverage is 90.62500% with 24 lines in your changes missing coverage. Please review.

Project coverage is 83.23%. Comparing base (d3f69b6) to head (d25e520).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2038      +/-   ##
===========================================
+ Coverage    83.19%   83.23%   +0.04%     
===========================================
  Files          495      508      +13     
  Lines        17773    18004     +231     
  Branches      2685     2699      +14     
===========================================
+ Hits         14785    14985     +200     
- Misses        2256     2274      +18     
- Partials       732      745      +13     
Files Coverage Δ
...in/com/datadog/android/api/feature/FeatureScope.kt 0.00% <ø> (ø)
...in/com/datadog/android/core/internal/SdkFeature.kt 90.86% <100.00%> (+1.76%) ⬆️
...rnal/persistence/datastore/DataStoreFileHandler.kt 100.00% <100.00%> (ø)
...rnal/persistence/datastore/NoOpDataStoreHandler.kt 100.00% <100.00%> (ø)
.../core/internal/persistence/datastore/ext/IntExt.kt 100.00% <100.00%> (ø)
...id/core/internal/persistence/tlvformat/TLVBlock.kt 100.00% <100.00%> (ø)
...ternal/persistence/tlvformat/TLVBlockFileReader.kt 100.00% <100.00%> (ø)
...ore/internal/persistence/tlvformat/TLVBlockType.kt 100.00% <100.00%> (ø)
...oid/core/persistence/datastore/DataStoreContent.kt 100.00% <100.00%> (ø)
...ernal/persistence/datastore/DatastoreFileWriter.kt 97.87% <97.87%> (ø)
... and 5 more

... and 31 files with indirect coverage changes

@jonathanmos jonathanmos marked this pull request as ready for review May 21, 2024 10:02
@jonathanmos jonathanmos requested review from a team as code owners May 21, 2024 10:02
Copy link
Member

@0xnm 0xnm left a comment

Choose a reason for hiding this comment

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

good start! I reviewed production files so far, didn't go through the tests yet. I left some questions/suggestions.

@jonathanmos jonathanmos force-pushed the jmoskovich/rum-4098/add-persistence branch from 6279225 to 564eb64 Compare May 22, 2024 08:16
@jonathanmos jonathanmos marked this pull request as draft May 26, 2024 18:50
@jonathanmos jonathanmos force-pushed the jmoskovich/rum-4098/add-persistence branch 13 times, most recently from 875464b to 459dd96 Compare June 2, 2024 18:04
@jonathanmos jonathanmos marked this pull request as ready for review June 4, 2024 07:32
@jonathanmos jonathanmos requested a review from mariusc83 June 4, 2024 07:33
@jonathanmos jonathanmos requested a review from 0xnm June 4, 2024 07:33
@jonathanmos jonathanmos force-pushed the jmoskovich/rum-4098/add-persistence branch from 05dcf33 to 1c3f646 Compare June 5, 2024 12:16
@jonathanmos jonathanmos requested a review from 0xnm June 6, 2024 09:06
Copy link
Member

@mariusc83 mariusc83 left a comment

Choose a reason for hiding this comment

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

LGTM !!

@jonathanmos jonathanmos requested a review from 0xnm June 20, 2024 07:33
@jonathanmos jonathanmos force-pushed the jmoskovich/rum-4098/add-persistence branch from ba49a80 to cc27469 Compare June 20, 2024 14:10
@jonathanmos jonathanmos merged commit 29692c8 into develop Jun 24, 2024
20 checks passed
@jonathanmos jonathanmos deleted the jmoskovich/rum-4098/add-persistence branch June 24, 2024 14:03
@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