This repository was archived by the owner on May 16, 2024. It is now read-only.
CI-for-pr-667#668
Draft
shwethaumashanker wants to merge 11 commits into
Draft
Conversation
A simple helper to automatically run paginated queries with ddb
This is useful to troubleshoot the internal DB state. Uses paginated queries
Due a bug in the sync process, that does not consume paginated results from dynamodb, we are getting duplicated users in dynamodb. This command searches all duplicated users based on email, keeping only the first one (most recent CreatedAt). It reports back the duplicated users and allow to delete them in dynamodb. Supports options to limit the users to list, dryrun mode, maximum duplicates to delete, etc.
We must only pass the unique keys to the deletion task, or dynamodb complains by duplicates (even on a delete!)
To speed up the deletion of >600k entries
We might have 1000s of users, and the ddb.Query() will return a paginated response. We must read all of the pages in order to work. Otherwise, the sync process will consider that the users retuned by the IDP do not exist, and create new entries in each iteration.
detect and report duplicated users when syncing, returning the oldest. This is important if there are duplicates in DB to be sure we use the oldest and provide a consistent state. Logging is Good to find out about the existence of the bug
Also do not log all duplicated emails, can be many
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also do not log all duplicated emails, can be many
What changed?
Why?
How did you test it?
Potential risks
Is patch release candidate?
Link to relevant docs PRs