-
Notifications
You must be signed in to change notification settings - Fork 60
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
users prune
- Paginate graphql site users - fix bug for soft deleted users
#909
Merged
Conversation
This file contains 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
…been deleted but exist in the aggregated_user_stats table
DaedalusG
changed the title
Paginate for through users in users prune - fix bug for soft deleted users
Jan 4, 2023
users prune
- Paginate graphql site users - fix bug for soft deleted users
…ding to fix that for break condition
mrnugget
reviewed
Jan 12, 2023
mrnugget
approved these changes
Jan 13, 2023
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
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.users
graphql api)It also adds pagination to pull 100 users per graphql request until all users in
site.users
have 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.