Skip to content

feat: add batch size option to certificate retirement API call#341

Merged
Akanshu-2u merged 2 commits into
masterfrom
ttak-apphelix/BOMS-488-batching
May 14, 2026
Merged

feat: add batch size option to certificate retirement API call#341
Akanshu-2u merged 2 commits into
masterfrom
ttak-apphelix/BOMS-488-batching

Conversation

@ttak-apphelix
Copy link
Copy Markdown
Member

@ttak-apphelix ttak-apphelix commented May 14, 2026

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:

Copilot AI review requested due to automatic review settings May 14, 2026 06:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 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 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-size accepts negative integers, and if 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 with if 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.

Comment thread util/jenkins/retired_user_cert_remover/retired_user_cert_remover.py Outdated
Comment thread util/jenkins/retired_user_cert_remover/retired_user_cert_remover.py Outdated
Comment thread util/jenkins/retired_user_cert_remover/retired_user_cert_remover.py Outdated
@Akanshu-2u Akanshu-2u merged commit 4495c0c into master May 14, 2026
1 of 3 checks passed
@Akanshu-2u Akanshu-2u deleted the ttak-apphelix/BOMS-488-batching branch May 14, 2026 09:26
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.

3 participants