feat(CLI): key cleanup using batches #SCD-687#1036
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces the ability to perform key cleanup using upload batches, allowing cleanup to be scheduled before uploads complete. The changes replace the previous cleanup mechanism with a new batch-based API endpoint and add delete_unmentioned_keys as a configuration file parameter.
Changes:
- Replaced
UploadCleanupfunction withCreateUploadBatchto use the new upload batches API - Added
delete_unmentioned_keysconfiguration parameter support in push section - Restructured configuration to use
PushandPullsections instead ofSourcesandTargets
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| clients/cli/cmd/internal/upload_cleanup.go | Updated to call CreateUploadBatch instead of UploadCleanup |
| clients/cli/cmd/internal/shared.go | Renamed and refactored UploadCleanup to CreateUploadBatch with new batch API |
| clients/cli/cmd/internal/push_source.go | Modified to read from config.Push and extract delete_unmentioned_keys parameter |
| clients/cli/cmd/internal/push.go | Updated cleanup logic to work without requiring --wait flag and use config parameter |
| clients/cli/cmd/internal/pull_target.go | Changed to read from config.Pull instead of config.Targets |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
forelabs
approved these changes
Jan 28, 2026
theSoenke
approved these changes
Jan 28, 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.
New upload batches API endpoint enables us to perform unmentioned keys cleanup before waiting for all the uploads to finish. This PR makes use of this change and also introduces
delete_unmentioned_keysas a configuration file parameter, so it doesn't need to be specified as the CLI argument.