Open
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the scale to zero sidecar logic to prevent hibernating clusters when backups are in progress. The changes ensure that the system checks for ongoing backups before deciding to hibernate a cluster, preventing potential data consistency issues.
Key changes:
- Added backup status checking logic to the hibernation decision process
- Registered Backup and BackupList types in the runtime scheme
- Enhanced test coverage for backup-in-progress scenarios
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/sidecar/sidecar.go | Registers Backup types in the runtime scheme for API access |
| internal/sidecar/scale_to_zero.go | Adds backup progress checking logic and new interface method |
| internal/sidecar/cluster_client.go | Implements getClusterBackups method to retrieve cluster backups |
| internal/sidecar/helper_test.go | Updates mock client to support backup status testing |
| internal/sidecar/scale_to_zero_test.go | Adds comprehensive test cases for backup-in-progress scenarios |
| doc/examples/cluster-example.yaml | Adds immediate backup configuration example |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
exekias
reviewed
Sep 2, 2025
6732735 to
2bdc585
Compare
2bdc585 to
279cd63
Compare
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.
This PR updates the scale to zero sidecar logic to only hibernate a cluster if there are no backups ongoing.