Skip to content

mbcc kaizen: 1/n: add skeleton for new MBC controller#250

Open
ushitora-anqou wants to merge 1 commit intomainfrom
push-uuvytvypvmmx
Open

mbcc kaizen: 1/n: add skeleton for new MBC controller#250
ushitora-anqou wants to merge 1 commit intomainfrom
push-uuvytvypvmmx

Conversation

@ushitora-anqou
Copy link
Contributor

@ushitora-anqou ushitora-anqou commented Feb 26, 2026

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.

@ushitora-anqou ushitora-anqou force-pushed the push-uuvytvypvmmx branch 2 times, most recently from ad48f5a to 36b8686 Compare March 3, 2026 01:03
@ushitora-anqou ushitora-anqou marked this pull request as ready for review March 3, 2026 02:50
@ushitora-anqou ushitora-anqou requested a review from a team as a code owner March 3, 2026 02:50
@ushitora-anqou ushitora-anqou removed the request for review from satoru-takeuchi March 3, 2026 02:50
@ushitora-anqou ushitora-anqou marked this pull request as draft March 3, 2026 02:50
@ushitora-anqou ushitora-anqou requested a review from Copilot March 3, 2026 02:50
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

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.MBCPrimaryReconciler and usecase.ReconcileMBCPrimary skeletons (with placeholder Provision/Finalize flows).
  • 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.
@ushitora-anqou ushitora-anqou marked this pull request as ready for review March 3, 2026 04:41
// }
// ...
//
// processN() should do the actual work and make conditionN() false eventually.
Copy link
Contributor

Choose a reason for hiding this comment

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

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto.

//
// 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing calls of the function(s) corresponding to step3. Is it omitted intentionally for now?

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