-
Notifications
You must be signed in to change notification settings - Fork 7
feat(CLI): key cleanup using batches #SCD-687 #1036
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
Conversation
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.
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>
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.