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

feat: Add retry policy to the data deletion service #24716

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented May 22, 2024

Description

The data deletion service now uses a retry policy. It has been refactored into a class so that the retry state may be stored as an instance variable. The service is now injected as well, rather than imported, to keep it decoupled from the controller and make testing easier.

The new service class and retry policy is modelled after the token price service in core: https://github.com/MetaMask/core/blob/3165e87096300a66e06bd949dde736f90ca24fbc/packages/assets-controllers/src/token-prices-service/codefi-v2.ts

Open in GitHub Codespaces

Related issues

This is a suggested change for #24503

Manual testing steps

N/A

Screenshots/Recordings

N/A

Pre-merge author checklist

(omitting - not applicable as this isn't targeting develop)

  • [] I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@Gudahtt Gudahtt force-pushed the delete-metametrics-data-controller-service-refactor branch 3 times, most recently from 3dc92b1 to c7dc3eb Compare May 22, 2024 18:47
@Gudahtt Gudahtt marked this pull request as ready for review May 22, 2024 19:02
@Gudahtt Gudahtt requested a review from a team as a code owner May 22, 2024 19:02
Copy link
Contributor

@NiranjanaBinoy NiranjanaBinoy left a comment

Choose a reason for hiding this comment

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

lgtm

@NiranjanaBinoy NiranjanaBinoy force-pushed the delete-metametrics-data-controller branch from 75158b0 to 1b8ad2a Compare May 23, 2024 15:07
@Gudahtt Gudahtt force-pushed the delete-metametrics-data-controller-service-refactor branch 2 times, most recently from 8cd68bb to 4e12767 Compare May 23, 2024 22:38
The data deletion service now uses a retry policy. It has been
refactored into a class so that the retry state may be stored as an
instance variable. The service is now injected as well, rather than
imported, to keep it decoupled from the controller and make testing
easier.
@Gudahtt Gudahtt force-pushed the delete-metametrics-data-controller-service-refactor branch from 4e12767 to 4ae47b6 Compare May 24, 2024 16:05
@Gudahtt
Copy link
Member Author

Gudahtt commented May 24, 2024

@metamaskbot update-policies

@metamaskbot
Copy link
Collaborator

Policies updated

@metamaskbot metamaskbot requested review from a team as code owners May 24, 2024 16:23
@NiranjanaBinoy NiranjanaBinoy merged commit 81e9b11 into delete-metametrics-data-controller May 24, 2024
64 of 66 checks passed
@NiranjanaBinoy NiranjanaBinoy deleted the delete-metametrics-data-controller-service-refactor branch May 24, 2024 18:21
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [4454d6d]
Page Load Metrics (394 ± 371 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint57141872010
domContentLoaded85315126
load532271394773371
domInteractive85315126
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 7.53 KiB (0.21%)
  • ui: 0 Bytes (0.00%)
  • common: -412 Bytes (-0.01%)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants