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

feat: Add "auto-split" arg to auto-gen UID prefixes #1035

Merged
merged 2 commits into from
Apr 2, 2021

Conversation

jrconlin
Copy link
Member

@jrconlin jrconlin commented Apr 2, 2021

Closes: #1034

Description

adds --auto_split / PURGE_AUTO_SPLIT arg to auto-gen uid_prefix fields for N digits, (e.g. --auto_split=3 will generate prefixes of ["000","001","002",...,"fff"]

Testing

You can use --dry_run and verify that queries for each prefix are generated

Issue(s)

Closes #1034.

@@ -190,6 +194,14 @@ def get_args():
help="Array of strings used to limit purges based on UID. "
"Each entry is a separate purge run."
)
parser.add_argument(
Copy link
Member

Choose a reason for hiding this comment

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

Is it worth adding a guard to error out if both auto_split and uid_prefixes are specified?

Copy link
Member Author

Choose a reason for hiding this comment

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

If this was a general use tool, absolutely. Since it's in-house, I'm willing to let it slide and just answer any questions SRE might come up with.

If they hit it as a problem, I'll add the guards.

@jrconlin jrconlin merged commit 487ac11 into master Apr 2, 2021
@jrconlin jrconlin deleted the feat/1034-auto-split branch April 2, 2021 22:34
@jrconlin jrconlin mentioned this pull request Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tool: Add Auto-split fxa_uid feature to purge_ttl.py
2 participants