Skip to content

Comments

Do not hibernate if backup is in progress#19

Open
eminano wants to merge 2 commits intomainfrom
do-not-hibernate-if-backup-ongoing
Open

Do not hibernate if backup is in progress#19
eminano wants to merge 2 commits intomainfrom
do-not-hibernate-if-backup-ongoing

Conversation

@eminano
Copy link
Contributor

@eminano eminano commented Sep 2, 2025

This PR updates the scale to zero sidecar logic to only hibernate a cluster if there are no backups ongoing.

@eminano eminano requested a review from Copilot September 2, 2025 13:16
Copy link
Contributor

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

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.

@eminano eminano force-pushed the do-not-hibernate-if-backup-ongoing branch from 6732735 to 2bdc585 Compare September 4, 2025 11:04
@eminano eminano force-pushed the do-not-hibernate-if-backup-ongoing branch from 2bdc585 to 279cd63 Compare September 4, 2025 11:07
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.

2 participants