Skip to content

Delete local user progress on account deletion (#25255) (#25283)#449

Merged
nausharipov merged 3 commits intotobf-all-tasks-28-03-23from
tobf-delete-local-user-progress
Mar 31, 2023
Merged

Delete local user progress on account deletion (#25255) (#25283)#449
nausharipov merged 3 commits intotobf-all-tasks-28-03-23from
tobf-delete-local-user-progress

Conversation

@nausharipov
Copy link
Copy Markdown
Collaborator

Delete local user progress on account deletion.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI.

Future<void> deleteAccount() async {
try {
await client.postDeleteUserProgress();
// TODO(nausharipov) review: is there a better place for this?
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Add AccountDeletionListener, notify all listeners here.
Add final _accountDeletionListeners = <AccountDeletionListener>[];

With methods like beforeAccountDeleted or afterAccountDeleted. Likely we should do "before...". Those methods should be async, we should wait for them to complete.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The implementation added extra code, which is not necessary for now. Added a comment.

Comment on lines +177 to +178
await _localStorageUserProgressRepository.deleteUserProgress();
await _cloudUserProgressRepository.deleteUserProgress();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

await Future.wait([...]);

@nausharipov nausharipov requested a review from alexeyinkin March 31, 2023 09:12
Copy link
Copy Markdown

@alexeyinkin alexeyinkin left a comment

Choose a reason for hiding this comment

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

LGTM (Internal review).

@nausharipov nausharipov merged commit 5477d63 into tobf-all-tasks-28-03-23 Mar 31, 2023
@nausharipov nausharipov deleted the tobf-delete-local-user-progress branch March 31, 2023 14:17
Amar3tto added a commit that referenced this pull request Feb 13, 2025
Add try catch for getting schema information
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