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

Provide distinct cache directory to the Rust SDK. #3370

Merged
merged 5 commits into from
Sep 3, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Aug 30, 2024

Content

Provide distinct cache directory to the Rust SDK.

Motivation and context

Fix a TODO and let the system be able to delete cache data if necessary (good practice)

Screenshots / GIFs

image

Previously the event-cache files were stored in the sessions/id folder.

Note: this PR does not delete the existing event-cache files, but user will have to logout soon anyway. AppMigration06 moves the cache files now.

Tests

  • Install the application as an upgrade of an existing installation and the app should start normally.
  • clear cache from the developer option
  • clear cache from the system

Everything should work as expected.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@bmarty bmarty requested a review from a team as a code owner August 30, 2024 16:44
@bmarty bmarty requested review from ganfra and removed request for a team August 30, 2024 16:44
Copy link
Contributor

github-actions bot commented Aug 30, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/YHxmi4

@bmarty
Copy link
Member Author

bmarty commented Sep 2, 2024

@Hywan can you have a look on this PR please? Since the application is playing with files created by the SDK, it would be nice if you can confirm that what is done is fine. Please let me know if you have any question. Thanks!

@Hywan
Copy link
Member

Hywan commented Sep 2, 2024

It's nice to put the cache in a different directory than the store, so that it makes really clear one can be dropped or not, and avoid accident. I think it's good.

Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this

Copy link

sonarcloud bot commented Sep 3, 2024

@bmarty bmarty added PR-Misc For other changes Run-Maestro Starts a Maestro Cloud session to run integration tests labels Sep 3, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Sep 3, 2024
Copy link

codecov bot commented Sep 3, 2024

Codecov Report

Attention: Patch coverage is 17.85714% with 23 lines in your changes missing coverage. Please review.

Project coverage is 82.60%. Comparing base (31d0621) to head (951dff8).
Report is 16 commits behind head on develop.

Files with missing lines Patch % Lines
...atures/migration/impl/migrations/AppMigration06.kt 0.00% 23 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3370      +/-   ##
===========================================
- Coverage    82.64%   82.60%   -0.05%     
===========================================
  Files         1684     1685       +1     
  Lines        39507    39535      +28     
  Branches      4806     4810       +4     
===========================================
+ Hits         32650    32656       +6     
- Misses        5175     5198      +23     
+ Partials      1682     1681       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmarty bmarty merged commit 91a81d1 into develop Sep 3, 2024
30 of 32 checks passed
@bmarty bmarty deleted the feature/bma/cacheFile branch September 3, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Misc For other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants