Skip to content

Update retry logic for Scan/Restore/DownloadBackup use cases#14050

Merged
zwarm merged 14 commits intodevelopfrom
issue/13326-auto-retry-on-fetch-status
Feb 12, 2021
Merged

Update retry logic for Scan/Restore/DownloadBackup use cases#14050
zwarm merged 14 commits intodevelopfrom
issue/13326-auto-retry-on-fetch-status

Conversation

@malinajirka
Copy link
Copy Markdown
Contributor

@malinajirka malinajirka commented Feb 12, 2021

Parent issue #13267

I recommend reviewing this PR by commits.

  • Moves "startWithDelay" outside of while loop in FetchScanStatus use case (it was a bug)
  • Adds retry logic to FetchScanStateUseCase
  • Updates retry logic in GetBackupDownloadStatus use case so it retries even on NetworkNotAvailable state
  • Updates retry logic in GetReestoreStatus use case so it retries even on NetworkNotAvailable state
  • Removes unnecessary nesting in all of the above usecases

To test:

  1. Select a site with Backup plan
  2. Open Activity Log
  3. Click on "more" button on one of the rewindable items
  4. Click on "Download backup"
  5. Make sure the download backup flow works as expected - you can try to turn off internet connection for 2 seconds during the process and notice that the flow recovers without showing any errors

  1. Select a site with Backup plan
  2. Open Activity Log
  3. Click on "more" button on one of the rewindable items
  4. Click on "Restore to this point"
  5. Make sure the restore flow works as expected - you can try to turn off internet connection for 2 seconds during the process and notice that the flow recovers without showing any errors

  1. Select a site with Scan plan
  2. Introduce an active threat on the site (eg. install the calendar plugin)
  3. Open Scan
  4. Click on ScanNow button
  5. Make sure the Scan works as expected - you can try to turn off internet connection for 2 seconds during the process and notice that the flow recovers without showing any errors

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@malinajirka malinajirka added this to the 16.8 milestone Feb 12, 2021
@malinajirka malinajirka requested a review from zwarm February 12, 2021 10:23
@malinajirka malinajirka self-assigned this Feb 12, 2021
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Feb 12, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Feb 12, 2021

You can test the changes on this Pull Request by downloading the APK here.

Copy link
Copy Markdown
Contributor

@zwarm zwarm left a comment

Choose a reason for hiding this comment

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

@malinajirka - nice improvements :) All flows work as expected. 👍

@zwarm zwarm merged commit f239815 into develop Feb 12, 2021
@zwarm zwarm deleted the issue/13326-auto-retry-on-fetch-status branch February 12, 2021 13:29
@malinajirka malinajirka mentioned this pull request Feb 15, 2021
67 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants