Skip to content

change api CreateOrUpdateMantleBackup to CreateMantleBackup#194

Merged
satoru-takeuchi merged 4 commits into
mainfrom
5672-lock-volume-2
Dec 3, 2025
Merged

change api CreateOrUpdateMantleBackup to CreateMantleBackup#194
satoru-takeuchi merged 4 commits into
mainfrom
5672-lock-volume-2

Conversation

@llamerada-jp

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Yuji Ito <llamerada.jp@gmail.com>
@llamerada-jp llamerada-jp force-pushed the 5672-lock-volume-2 branch 2 times, most recently from 0aeb1d9 to 596dd6f Compare December 2, 2025 01:43
Signed-off-by: Yuji Ito <llamerada.jp@gmail.com>
@llamerada-jp llamerada-jp force-pushed the 5672-lock-volume-2 branch 2 times, most recently from 8c5dd86 to a350295 Compare December 3, 2025 04:35
`ctrl.Result{Requeue: true}` is influenced by backing off. We want
to avoid it.

Signed-off-by: Yuji Ito <llamerada.jp@gmail.com>
After created MB, there is no need to update it. And We Found
a bug caused by overwriting existing annotations

Signed-off-by: Yuji Ito <llamerada.jp@gmail.com>
@llamerada-jp llamerada-jp changed the title bugfix change api CreateOrUpdateMantleBackup to CreateMantleBackup Dec 3, 2025
@llamerada-jp llamerada-jp marked this pull request as ready for review December 3, 2025 06:59
@llamerada-jp llamerada-jp requested a review from Copilot December 3, 2025 06:59

Copilot AI left a comment

Copy link
Copy Markdown

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 refactors the gRPC API by renaming CreateOrUpdateMantleBackup to CreateMantleBackup, reflecting a change in semantics where the API now only creates backups and explicitly checks for existing backups rather than using create-or-update logic. Additionally, it standardizes the requeue reconciliation mechanism by requiring the REQUEUE_RECONCILIATION_AFTER environment variable and updates test timeouts and logging for better debugging.

  • Renamed gRPC API from CreateOrUpdateMantleBackup to CreateMantleBackup with updated semantics that explicitly check for existing backups
  • Changed requeueReconciliation() to require REQUEUE_RECONCILIATION_AFTER env var (defaulting to "10s" in configs) instead of allowing immediate requeue
  • Enhanced e2e test debugging by increasing log tail sizes, adding comprehensive resource dumps on failure, and improving test helper logging

Reviewed changes

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

Show a summary per file
File Description
pkg/controller/proto/controller.proto Renamed RPC method and message types from CreateOrUpdateMantleBackup to CreateMantleBackup
pkg/controller/proto/controller.pb.go Regenerated protobuf Go code for the renamed API
pkg/controller/proto/controller_grpc.pb.go Regenerated gRPC Go code for the renamed API
pkg/controller/proto/controller_grpc.pb_mock.go Updated mock implementation for the renamed API
internal/controller/replication.go Refactored CreateMantleBackup implementation to explicitly check if backup exists before creating, with improved error messages
internal/controller/mantlebackup_controller.go Updated client call from CreateOrUpdateMantleBackup to CreateMantleBackup
internal/controller/mantlebackup_controller_test.go Updated mock expectations and test assertions to use CreateMantleBackup and check RequeueAfter instead of Requeue
internal/controller/util.go Changed requeueReconciliation() to require REQUEUE_RECONCILIATION_AFTER env var and panic if not set
internal/controller/suite_test.go Added REQUEUE_RECONCILIATION_AFTER env var setup in test suite
internal/webhook/v1/suite_test.go Added REQUEUE_RECONCILIATION_AFTER env var setup in test suite
test/e2e/multik8s/testutil/util.go Added GinkgoHelper() call, improved logging with cluster/namespace context, and migrated to HaveLen() matcher
test/e2e/multik8s/full_backup_test.go Migrated test assertions to use HaveLen() matcher and fixed comment capitalization
test/e2e/Makefile Increased log tail from 100 to 1000 lines and added comprehensive resource dumps on test failure
test/e2e/testdata/values-mantle-primary-template.yaml Changed REQUEUE_RECONCILIATION_AFTER value from "1s" to "10s"
test/e2e/testdata/values-mantle-secondary-template.yaml Changed from REQUEUE_RECONCILIATION_IMMEDIATELY to REQUEUE_RECONCILIATION_AFTER with "10s" value
docs/controller-protocol.md Updated documentation to reflect renamed API methods and message types

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

@satoru-takeuchi satoru-takeuchi merged commit c28d13f into main Dec 3, 2025
19 checks passed
@satoru-takeuchi satoru-takeuchi deleted the 5672-lock-volume-2 branch December 3, 2025 07:20
Copilot AI mentioned this pull request Dec 8, 2025
llamerada-jp added a commit that referenced this pull request Dec 8, 2025
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.

3 participants