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

Commit mass-deletion script #3959

Merged
merged 2 commits into from
Jan 13, 2025
Merged

Commit mass-deletion script #3959

merged 2 commits into from
Jan 13, 2025

Conversation

andrew-nowak
Copy link
Member

What does this change?

Store the mass deletion script in repo for reuse and an example of how to create and run mass operation scripts.

How should a reviewer test this change?

Does the README make sense? Is the script easy to understand

@andrew-nowak andrew-nowak requested a review from a team as a code owner November 16, 2022 16:18

del=todelete.txt
prog=progress.txt
com="complete.txt"
Copy link
Contributor

Choose a reason for hiding this comment

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

if this value is quoted, does that mean the others should be too?

Copy link
Member Author

Choose a reason for hiding this comment

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

there's no spaces in the values so all are optional for quoting. I've removed the quotes from complete for consistency

ndone=$((ndone + 1))
if [[ $skipping = 1 && -n "$last" && $id != $last ]]; then
continue
elif [[ $skipping = 1 && -n "$last" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

it took me a minute to work out why skipping was initially set to 1. I take it that it's because we're looking through the ids until we find the first one after the 'prog' value (if there's one set) and only then do we start processing them? this seems v sensible but might benefit from a brief comment to explain the pattern?

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, added

Copy link
Contributor

@bryophyta bryophyta left a comment

Choose a reason for hiding this comment

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

I added a couple of small comments; looks good to me! I tested success and error conditions locally, though without the curl command

@andrew-nowak andrew-nowak requested a review from a team as a code owner January 13, 2025 15:20
@andrew-nowak andrew-nowak force-pushed the an/mass-deletion-script branch from 1c47700 to 1bcc139 Compare January 13, 2025 15:20
Copy link

github-actions bot commented Jan 13, 2025

@prout-bot
Copy link

Seen on image-loader, cropper (merged by @andrew-nowak 7 minutes and 34 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on metadata-editor, kahuna (merged by @andrew-nowak 7 minutes and 45 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on leases (merged by @andrew-nowak 7 minutes and 49 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on collections, media-api (merged by @andrew-nowak 7 minutes and 58 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on collections (merged by @andrew-nowak 7 minutes and 58 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on media-api (merged by @andrew-nowak 7 minutes and 59 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on collections (merged by @andrew-nowak 8 minutes and 2 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on usage (merged by @andrew-nowak 8 minutes and 15 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on thrall (merged by @andrew-nowak 8 minutes and 19 seconds ago) Please check your changes!

@prout-bot
Copy link

Seen on auth (merged by @andrew-nowak 8 minutes and 27 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants