feat: add batch size option to certificate retirement API call#341
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds optional batching support to the retired-user certificate cleanup Jenkins script by allowing the retire_certs_s3 API call to be parameterized with a batch_size query param.
Changes:
- Extend
call_retire_certs_api(...)to accept an optionalbatch_sizeand include it in request params when set. - Update the Click CLI to accept a
--batch-sizeargument. - Change
--dry-runfrom a boolean flag to a string option and parse it into a boolean.
Comments suppressed due to low confidence (1)
util/jenkins/retired_user_cert_remover/retired_user_cert_remover.py:142
--batch-sizeaccepts negative integers, andif batch_size:will then include a negative value in the request params. If the API expects a non-negative limit, enforce it at the CLI level (e.g.,type=click.IntRange(min=0)) and/or guard withif batch_size > 0:before adding the param.
@click.option('--dry-run', default='true', help='Run in dry-run mode without making any changes (true/false)')
@click.option('--batch-size', default=0, type=int, help='Max certificates to process per run (0 = no limit)')
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ate retirement API
Akanshu-2u
approved these changes
May 14, 2026
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.
Overview:
Adds optional batching support to the retired-user certificate cleanup Jenkins script by allowing the retire_certs_s3 API call to be parameterized with a batch_size query param.
Changes:
Extend call_retire_certs_api(...) to accept an optional batch_size and include it in request params when set.
Update the Click CLI to accept a --batch-size argument.
Change --dry-run from a boolean flag
JIRA ticket:
Related PR: