Skip to content

Conversation

@ushitora-anqou
Copy link
Contributor

@ushitora-anqou ushitora-anqou commented Dec 1, 2025

Don't merge this PR until the release process is completed. This PR has a breaking change, so please release and deploy it carefully. In addition, this PR should be merged after #197 is merged. done.

This PR should be merged after #220. Done.

This commit renames MantleBackup's ReadyToUse condition to
SnapshotCaptured. This is a breaking change; before deploying it, users
should stop all of the mantle-controller Pods in the primary and
secondary clusters, patch the conditions by hand, and then start the new
controller.

Copy link

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 performs a comprehensive rename of the ReadyToUse terminology to SnapshotCaptured across the entire Mantle backup and restore system. This change affects API types, controller logic, tests, and documentation to better reflect that the condition indicates when a snapshot has been successfully captured, rather than using the generic "ready to use" terminology.

Key Changes:

  • Renamed API condition types from ReadyToUse to SnapshotCaptured for both MantleBackup and MantleRestore resources
  • Updated all method names from IsReady() to IsSnapshotCaptured() for both resource types
  • Updated condition reason constants and helper function names throughout the codebase

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
api/v1/mantlebackup_types.go Renamed BackupConditionReadyToUse to BackupConditionSnapshotCaptured, updated reason constants, and renamed IsReady() method to IsSnapshotCaptured()
api/v1/mantlerestore_types.go Renamed RestoreConditionReadyToUse to RestoreConditionSnapshotCaptured, updated comments, and renamed IsReady() method to IsSnapshotCaptured()
internal/controller/mantlebackup_controller.go Updated all references to use IsSnapshotCaptured(), renamed struct field isSecondaryMantleBackupReadyToUse to isSecondaryMantleBackupSnapshotCaptured, and updated condition types and reasons
internal/controller/mantlebackup_controller_test.go Updated all test assertions to use IsSnapshotCaptured(), renamed helper function parameters and updated condition types throughout tests
internal/controller/mantlerestore_controller.go Updated condition type from RestoreConditionReadyToUse to RestoreConditionSnapshotCaptured and changed method calls to IsSnapshotCaptured()
internal/controller/mantlerestore_controller_test.go Updated test setup to use renamed WaitForBackupSnapshotCaptured() helper
internal/controller/replication.go Updated condition check to use IsSnapshotCaptured() and updated error message text
internal/testutil/resources.go Renamed WaitForBackupReady() to WaitForBackupSnapshotCaptured() and updated internal method call
test/e2e/singlek8s/util.go Renamed isMantleBackupReady() to isMantleBackupSnapshotCaptured() and updated isMantleRestoreReady() to call IsSnapshotCaptured()
test/e2e/singlek8s/backup_test.go Updated test descriptions and function calls to use new SnapshotCaptured terminology
test/e2e/singlek8s/restore_test.go Updated test description and assertion to use IsSnapshotCaptured()
test/e2e/multik8s/testutil/util.go Renamed WaitMantleBackupReadyToUse() to WaitMantleBackupSnapshotCaptured() and updated comments and error messages
test/e2e/multik8s/misc_test.go Updated test assertions to use IsSnapshotCaptured()
test/e2e/multik8s/full_backup_test.go Updated condition check and error message to use SnapshotCaptured terminology
test/e2e/multik8s/change_to_secondary_test.go Updated function call to use renamed WaitMantleBackupSnapshotCaptured()
test/e2e/multik8s/change_to_primary_test.go Updated function call to use renamed WaitMantleBackupSnapshotCaptured()
docs/design.md Updated documentation examples to show SnapshotCaptured condition type instead of ReadyToUse

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ushitora-anqou ushitora-anqou force-pushed the rename-readytouse-to-snapshotcaptured branch from ebeca0a to 7a68790 Compare December 1, 2025 05:00
@ushitora-anqou ushitora-anqou force-pushed the rename-readytouse-to-snapshotcaptured branch 3 times, most recently from d7f339d to 2ad8bc3 Compare December 10, 2025 06:21
@ushitora-anqou ushitora-anqou force-pushed the rename-readytouse-to-snapshotcaptured branch 3 times, most recently from 9135ec2 to 1b4f7df Compare December 19, 2025 01:47
Copy link

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

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ushitora-anqou ushitora-anqou force-pushed the rename-readytouse-to-snapshotcaptured branch 2 times, most recently from ed808ec to ffcf527 Compare December 23, 2025 01:07
@ushitora-anqou ushitora-anqou marked this pull request as ready for review December 23, 2025 05:08
@ushitora-anqou
Copy link
Contributor Author

ushitora-anqou commented Dec 24, 2025

@llamerada-jp I've fixed my code in the commit 80ab2f3. Could you review this again? I'll merge this PR next year, so we don't have to rush.

Copy link
Contributor

@llamerada-jp llamerada-jp left a comment

Choose a reason for hiding this comment

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

LGTM

@ushitora-anqou ushitora-anqou force-pushed the rename-readytouse-to-snapshotcaptured branch from 80ab2f3 to 056a3cf Compare January 7, 2026 07:55
@ushitora-anqou ushitora-anqou changed the title rename ReadyToUse to SnapshotCaptured BREAKING CHANGE: rename ReadyToUse to SnapshotCaptured Jan 7, 2026
@ushitora-anqou ushitora-anqou requested a review from Copilot January 7, 2026 08:06
This commit renames MantleBackup's ReadyToUse condition to
SnapshotCaptured. This is a breaking change; before deploying it, users
should stop all of the mantle-controller Pods in the primary and
secondary clusters, patch the conditions by hand, and then start the new
controller.

Signed-off-by: Ryotaro Banno <[email protected]>
Copy link

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

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ushitora-anqou ushitora-anqou force-pushed the rename-readytouse-to-snapshotcaptured branch from 056a3cf to a4ddae2 Compare January 7, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants