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

Backup service #3952

Merged
merged 9 commits into from
Dec 4, 2023
Merged

Backup service #3952

merged 9 commits into from
Dec 4, 2023

Conversation

nalcalag
Copy link
Contributor

@nalcalag nalcalag commented Dec 1, 2023

Task/Issue URL: https://app.asana.com/0/0/1206040339100181/f

Description

Implemented backup key/value service

Steps to test this PR

ATB mapped to BackUp prefs

  • Make sure you have a previous version of the app installed
  • Put a log on Line 35 of ReinstallAtbListener to check preference mapping
  • Install from branch
  • Check log appears in Logcat

Backup service

  • Install from branch
  • Run ./test_cloud_backup.sh com.duckduckgo.mobile.android.debug in the terminal
  • Check backup is success

Pixel sent when Backup service enabled

  • Install from this branch
  • Run ./test_cloud_backup.sh com.duckduckgo.mobile.android.debug in the terminal
  • Wait until backup is success
  • Go to Logcat
  • Check m_backup_service_enabled pixel is sent

No UI changes

@nalcalag
Copy link
Contributor Author

nalcalag commented Dec 1, 2023

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

test_cloud_backup.sh Outdated Show resolved Hide resolved
@nalcalag nalcalag marked this pull request as ready for review December 1, 2023 13:56
Copy link
Contributor

@marcosholgado marcosholgado left a comment

Choose a reason for hiding this comment

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

We are backing up the whole statistics shared prefs file and should only backup the atb value.

@nalcalag nalcalag force-pushed the feature/noelia/backup_service branch from deb4ce3 to e1dfc47 Compare December 1, 2023 17:43
@nalcalag nalcalag force-pushed the feature/noelia/backup_service branch 2 times, most recently from ba32243 to 6f3eb8a Compare December 4, 2023 16:30
@nalcalag nalcalag force-pushed the feature/noelia/backup_service branch from 6f3eb8a to c221498 Compare December 4, 2023 17:01
Copy link
Contributor

@marcosholgado marcosholgado left a comment

Choose a reason for hiding this comment

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

LGTM

A few nits and the namespace of the backup impl should be different.

backup-agent/backup-agent-impl/build.gradle Outdated Show resolved Hide resolved
backup-agent/backup-agent-impl/build.gradle Outdated Show resolved Hide resolved
backup-agent/backup-agent-impl/build.gradle Outdated Show resolved Hide resolved
backup-agent/backup-agent-impl/build.gradle Outdated Show resolved Hide resolved
backup-agent/backup-agent-impl/build.gradle Outdated Show resolved Hide resolved
Task/Issue URL:
https://app.asana.com/0/488551667048375/1206059122944073/f

### Description
Implementation for adding variant `ru` for returning users

### Steps to test this PR

- Add a log in getVariantKey() implementation so you can check it's
value

_New user install_
- Install from this branch
- Open logcat
- [x] Check defaultVariant is allocated (_emptyString_)

_Returning user install_
- Follow previous steps
- Perform a backup: Run `./test_cloud_backup.sh
com.duckduckgo.mobile.android.debug` in the terminal
- Open the app
- [x] Check `ru` variant is allocated to the user

### No UI changes
@nalcalag nalcalag merged commit cd9a695 into develop Dec 4, 2023
5 checks passed
@nalcalag nalcalag deleted the feature/noelia/backup_service branch December 4, 2023 18:49
CDRussell added a commit that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants