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-2708: Refactor and split classes #1873

Merged
merged 5 commits into from Mar 25, 2024

Conversation

jonathanmos
Copy link
Contributor

@jonathanmos jonathanmos commented Feb 22, 2024

The previous pr had unresolvable git conflicts so I've recreated the commits on a new branch.

What does this PR do?

• Extract cache logic into BitmapCacheManager
• Rename ResourcesSerializer to ResourceResolver
• Move ResourceDataQueueItem insertion into the DataQueueHandler to a new ResourceItemCreationHandler
• Cleanup the callbacks so that all exit points from the ResourceResolver come from the same method
• Add telemetry/maintainer logging to failures in MD5 hash generation and webp compression
• Remove mimetype from the wireframe (no longer needed because resource endpoint requests already contain the content type)

Motivation

Separate the refactor pr from the pr that removes the feature flag, to make it easier to review

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-2708/new-refactor branch from e65bd40 to 1e951e9 Compare February 25, 2024 12:53
@codecov-commenter
Copy link

codecov-commenter commented Feb 25, 2024

Codecov Report

Merging #1873 (ffe71a7) into develop (12e4b09) will decrease coverage by 0.03%.
Report is 12 commits behind head on develop.
The diff coverage is 94.95%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1873      +/-   ##
===========================================
- Coverage    83.34%   83.31%   -0.03%     
===========================================
  Files          481      483       +2     
  Lines        17408    17390      -18     
  Branches      2589     2593       +4     
===========================================
- Hits         14508    14487      -21     
  Misses        2193     2193              
- Partials       707      710       +3     
Files Coverage Δ
...dog/android/sessionreplay/SessionReplayRecorder.kt 96.33% <100.00%> (+0.18%) ⬆️
...internal/recorder/resources/BitmapCachesManager.kt 100.00% <100.00%> (ø)
.../recorder/resources/DefaultImageWireframeHelper.kt 94.44% <100.00%> (-0.76%) ⬇️
.../recorder/resources/ResourceItemCreationHandler.kt 100.00% <100.00%> (ø)
...replay/internal/recorder/wrappers/CanvasWrapper.kt 15.79% <ø> (ø)
...ay/internal/recorder/resources/MD5HashGenerator.kt 53.33% <0.00%> (ø)
...roid/sessionreplay/internal/utils/DrawableUtils.kt 93.75% <95.83%> (-0.19%) ⬇️
...ay/internal/recorder/resources/ResourceResolver.kt 97.12% <97.12%> (ø)
...nternal/recorder/resources/WebPImageCompression.kt 63.16% <28.57%> (-15.41%) ⬇️

... and 20 files with indirect coverage changes

@jonathanmos jonathanmos marked this pull request as ready for review February 28, 2024 08:39
@jonathanmos jonathanmos requested review from a team as code owners February 28, 2024 08:39
Base automatically changed from jmoskovich/rum-2708/enable-resource-endpoint to develop March 5, 2024 11:26
@jonathanmos jonathanmos changed the title RUM-2708: Refactor and split classes (new) RUM-2708: Refactor and split classes Mar 6, 2024
@jonathanmos jonathanmos force-pushed the jmoskovich/rum-2708/new-refactor branch from d7311ed to ce43622 Compare March 6, 2024 09:37
@jonathanmos jonathanmos requested a review from 0xnm March 12, 2024 12:12
@jonathanmos jonathanmos force-pushed the jmoskovich/rum-2708/new-refactor branch from 737969c to 6ccbc24 Compare March 14, 2024 08:32
@jonathanmos jonathanmos force-pushed the jmoskovich/rum-2708/new-refactor branch from 6ccbc24 to a6623d2 Compare March 21, 2024 08:32
Copy link
Contributor

@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.

lgtm! I added few questions, but I don't think they are blocking for me.

@jonathanmos jonathanmos force-pushed the jmoskovich/rum-2708/new-refactor branch from a6623d2 to ffe71a7 Compare March 21, 2024 11:01
@jonathanmos jonathanmos merged commit 2777424 into develop Mar 25, 2024
23 checks passed
@jonathanmos jonathanmos deleted the jmoskovich/rum-2708/new-refactor branch March 25, 2024 09:02
@xgouchet xgouchet added this to the 2.8.x milestone Apr 5, 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.

None yet

4 participants