mbcc kaizen: 1/n: add skeleton for new MBC controller#250
Open
ushitora-anqou wants to merge 1 commit intomainfrom
Open
mbcc kaizen: 1/n: add skeleton for new MBC controller#250ushitora-anqou wants to merge 1 commit intomainfrom
ushitora-anqou wants to merge 1 commit intomainfrom
Conversation
ad48f5a to
36b8686
Compare
There was a problem hiding this comment.
Pull request overview
Introduces the initial scaffolding for a new MantleBackupConfig (MBC) primary-cluster reconciliation architecture, adding domain/usecase layers and wiring the new usecase entrypoint into the existing controller reconciler.
Changes:
- Add
domain.MBCPrimaryReconcilerandusecase.ReconcileMBCPrimaryskeletons (with placeholderProvision/Finalizeflows). - Invoke the new usecase from
MantleBackupConfigReconciler.Reconcile. - Add basic unit tests for the new domain/usecase packages and introduce a dedicated golangci-lint config + Makefile lint target.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/controller/usecase/reconcile_mbc_primary.go | New usecase skeleton for primary MBC reconciliation. |
| internal/controller/usecase/reconcile_mbc_primary_test.go | New unit test for the usecase entrypoint. |
| internal/controller/domain/mbc_primary_reconciler.go | New domain reconciler skeleton with Provision/Finalize placeholders. |
| internal/controller/domain/mbc_primary_reconciler_test.go | New unit tests for domain Provision/Finalize placeholders. |
| internal/controller/mantlebackupconfig_controller.go | Wire the new usecase into the existing MBC controller reconciler. |
| .golangci-new.yml | New golangci-lint configuration intended for the new architecture directories. |
| Makefile | Run golangci-lint with the new config for domain/usecase directories. |
| go.mod / go.sum | Add dependency for github.com/go-openapi/testify/v2 used in new tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This is part 1 commit for the MantleBackupConfig controller's kaizen. This commit adds skeleton code for its new architecture. Although the new code is invoked from the existing reconciler, this commit does not introduce any functional change.
36b8686 to
ba68699
Compare
satoru-takeuchi
requested changes
Mar 6, 2026
| // } | ||
| // ... | ||
| // | ||
| // processN() should do the actual work and make conditionN() false eventually. |
Contributor
There was a problem hiding this comment.
Suggested change
| // processN() should do the actual work and make conditionN() false eventually. | |
| // processN() should do the actual work and make conditionN false eventually. |
Or replace conditionN on L18 and L21 with conditionN(), please.
| // } | ||
| // ... | ||
| // | ||
| // processN() should do the actual work and make conditionN() false eventually. |
| // | ||
| // 1. Fetch MantleBackupConfig and other related resources. | ||
| // 2. Run Provision or Finalize based on the deletion timestamp of MantleBackupConfig. | ||
| // 3. Update the status of MantleBackupConfig and related resources accordingly. |
Contributor
There was a problem hiding this comment.
Missing calls of the function(s) corresponding to step3. Is it omitted intentionally for now?
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 is part 1 commit for the MantleBackupConfig controller's kaizen. This
commit adds skeleton code for its new architecture. Although the new code is
invoked from the existing reconciler, this commit does not introduce any
functional change.