-
-
Notifications
You must be signed in to change notification settings - Fork 610
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
admin: Add pause-identifier and unpause-account subcommands #7668
Conversation
@pgporada, this PR appears to contain configuration and/or SQL schema changes. Please ensure that a corresponding deployment ticket has been filed with the new values. |
cmd/admin/testdata/test_pause_data_invalid_noIdentifierType.csv
Outdated
Show resolved
Hide resolved
This is looks really good. I'm going to give this a better look tomorrow morning. Thanks @pgporada! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overarching comment is that I think the input format for unpausing should just be a list of accounts, not a list of account-identifier pairs. I think that if you make that simplification, then the pausing and unpausing code will become completely independent code paths that could live in separate files, like the other subcommands.
}, | ||
}, | ||
} | ||
response, err := a.sac.PauseIdentifiers(ctx, &req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the PauseIdentifiers gRPC method can take many identifiers as input. Maybe collect rows from the CSV into batches of 100, and then send those in a single request?
Even better, make the batch size controllable with a command line flag that defaults to 100 or so, sort of like the -parallelism
flag on other admin subcommands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to skip this for now. This sounds like a good future improvement.
return "Administratively unpause an account to allow certificate issuance attempts" | ||
} | ||
|
||
func (u *subcommandUnpauseAccount) Flags(flag *flag.FlagSet) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally optional suggestion: implement a parallelism flag, like some of the other subcommands have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to skip this for now. This sounds like a good future improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Implements tooling in
admin
that allows an operator to administratively pause a pairing ofaccount,identifierType,identifierValues...
from a CSV file and unpause a list of registration ID/account IDs from a file.There are two new subcommands:
pause-identifier
andunpause-account
whose help functions are written below.Relates to #7406
Fixes #7618