Skip to content

Add finalizer on LogicalClusterMigration while migration is in progress - #4415

Merged
kcp-ci-bot merged 2 commits into
kcp-dev:mainfrom
Sarthak-Shreshtha01:fix/issue-4405
Oct 4, 2026
Merged

kcp-ci-bot merged 2 commits into
kcp-dev:mainfrom
Sarthak-Shreshtha01:fix/issue-4405

Conversation

@Sarthak-Shreshtha01

Copy link
Copy Markdown
Contributor

Summary

A LogicalClusterMigration could be deleted while the migration was still running. The origin shard now adds a finalizer before the migration starts. The destination shard removes it when the migration is completed, and any involved shard removes it when the migration has failed, so failed migrations do not get stuck.

Added tests: TestAddFinalizer and TestReconcile_removesFinalizerInTerminalPhases.

What Type of PR Is This?

/kind feature

Related Issue(s)

Fixes #4405

Release Notes

LogicalClusterMigration objects now get a finalizer that prevents their deletion while the migration is in progress.

Signed-off-by: Sarthak <sarthakshreshtha345@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 10:03
@kcp-ci-bot kcp-ci-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 2, 2026
@kcp-ci-bot kcp-ci-bot added dco-signoff: yes Indicates the PR's author has signed the DCO. kind/feature Categorizes issue or PR as related to a new feature. labels Oct 2, 2026

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kcp-ci-bot kcp-ci-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 2, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

Hi @Sarthak-Shreshtha01. Thanks for your PR.

I'm waiting for a kcp-dev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ntnn

ntnn commented Oct 4, 2026

Copy link
Copy Markdown
Member

/ok-to-test

Thank you! This looks very good already

@kcp-ci-bot kcp-ci-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 4, 2026
Signed-off-by: Sarthak <sarthakshreshtha345@gmail.com>
@ntnn

ntnn commented Oct 4, 2026

Copy link
Copy Markdown
Member

/test pull-kcp-test-e2e-sharded

Unrelated:

=== FAIL: test/e2e/garbagecollector TestCrossNamespaceReferences (35.23

@ntnn ntnn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm
/approve

Thank you!

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 4, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 1171d7c673e6d9be26cafb6b97e61364b8913edf

@kcp-ci-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ntnn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 4, 2026
@kcp-ci-bot
kcp-ci-bot merged commit 3614526 into kcp-dev:main Oct 4, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: finalizer on LogicalClusterMigration

4 participants