users prune - Paginate graphql site users - fix bug for soft deleted users - #909
Merged
Conversation
…been deleted but exist in the aggregated_user_stats table
users prune - Paginate graphql site users - fix bug for soft deleted users
…ding to fix that for break condition
DaedalusG
marked this pull request as ready for review
January 11, 2023 23:03
mrnugget
reviewed
Jan 12, 2023
mrnugget
approved these changes
Jan 13, 2023
DaedalusG
enabled auto-merge (squash)
January 14, 2023 07:52
jdpleiness
pushed a commit
that referenced
this pull request
Jan 19, 2023
…d users (#909) * fixes bug in which request is made to delete users that have already been deleted but exist in the aggregated_user_stats table * implemented some pagination -- totalCount of nodes is always 0 -- needing to fix that for break condition * fixed totalCount issue -- switched DoRaw methods to Do * remove development print statements; hide users table behind flag; improve comments * gofmt * added a few more comments * style improvements * better graphQL querry formatting for single use queries
scjohns
pushed a commit
that referenced
this pull request
Apr 24, 2023
…d users (#909) * fixes bug in which request is made to delete users that have already been deleted but exist in the aggregated_user_stats table * implemented some pagination -- totalCount of nodes is always 0 -- needing to fix that for break condition * fixed totalCount issue -- switched DoRaw methods to Do * remove development print statements; hide users table behind flag; improve comments * gofmt * added a few more comments * style improvements * better graphQL querry formatting for single use queries
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR fixes an issue where user removal graphQL queries were issued to delete users who had already been soft deleted (these users are returned by the
site.usersgraphql api)It also adds pagination to pull 100 users per graphql request until all users in
site.usershave been checked against removal conditionsFor a better UX on large instances printing a table of users to be deleted during the confirmation check to delete users has been placed behind a flag
This PR is primarily a bug fix since currently the command is broken -- further documentation of the command will be added when its more robust (for instance allowing input of a json user exclusion list, and the addition of unit tests)
Test plan
This command was tested against our dogfood kubernetes instance and cse-aws docker compose instance.