Skip to content

Revert "Add support for Orphan management policy"#931

Merged
phisco merged 1 commit intocrossplane:mainfrom
lsviben:revert-864
Feb 17, 2026
Merged

Revert "Add support for Orphan management policy"#931
phisco merged 1 commit intocrossplane:mainfrom
lsviben:revert-864

Conversation

@lsviben
Copy link
Contributor

@lsviben lsviben commented Feb 17, 2026

This reverts commit 26bc05a, reversing changes made to af8c3fb.

Description of your changes

Reverts #864

Discussed with @bobh66 in Crossplane Slack. We would like to hold off on changes to management policies until we find a better aligned solution.

Ref: #930

Fixes #

I have:

Need help with this checklist? See the cheat sheet.

This reverts commit 26bc05a, reversing
changes made to af8c3fb.

Signed-off-by: lsviben <sviben.lovro@gmail.com>
@lsviben lsviben requested a review from a team as a code owner February 17, 2026 11:14
@lsviben lsviben requested a review from bobh66 February 17, 2026 11:14
@lsviben lsviben changed the title Revert "Merge pull request #864 from nokia/add_orphan_policy" Revert "Add support for Orphan management policy" Feb 17, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

📝 Walkthrough

Walkthrough

This PR removes the ManagementActionOrphan constant and all related Orphan management action functionality from the codebase, including API definitions, reconciler policy logic, and associated test cases.

Changes

Cohort / File(s) Summary
API Definitions
apis/common/policies.go, apis/common/v1/policies.go
Removed ManagementActionOrphan constant declaration and removed "Orphan" from kubebuilder enum validation rules.
Reconciler Logic
pkg/reconciler/managed/policies.go
Removed references to xpv1.ManagementActionOrphan from default supported policies and from ShouldCreate, ShouldUpdate, and ShouldLateInitialize policy checks.
Test Coverage
pkg/reconciler/managed/reconciler_legacy_test.go, pkg/reconciler/managed/reconciler_modern_test.go
Removed all test cases related to Orphan management action across multiple test functions (ManagementPolicyOrphanCreateSuccessful, ManagementPoliciesEnabledHasCreateOrphan/UpdateOrphan/LateInitializeOrphan, DeletionManagementActionOrphan, and others); also introduces a typo in test case key "UnpublishConnectionDetailsDeletionPolicyDeleteOrpahn".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Breaking Changes ❌ Error The pull request removes ManagementActionOrphan, a public/exported constant from apis/common/policies.go and apis/common/v1/policies.go. According to the breaking change validation rule defined in .coderabbit.yaml, removal of public Go code requires a breaking-change label because this is a library repository where all exported APIs are public. Please add the breaking-change label to this pull request to indicate that this is an intentional breaking change to the public API.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description directly relates to the changeset, explaining the revert of orphan management policy support and providing context for the decision.
Title check ✅ Passed The title clearly describes the main change: reverting a previous merge that added orphan policy support, which aligns with the substantial removal of orphan-related code across multiple files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/reconciler/managed/reconciler_legacy_test.go`:
- Line 89: The test case map contains a typo in the key
"UnpublishConnectionDetailsDeletionPolicyDeleteOrpahn"; rename this key to
"UnpublishConnectionDetailsDeletionPolicyDeleteOrphan" in the test table within
reconciler_legacy_test.go so the test name is spelled correctly (search for the
existing map entry with the incorrect key and replace it with the corrected
string); no other code logic changes are required.

want: want{result: reconcile.Result{}},
},
"UnpublishConnectionDetailsDeletionPolicyDeleteOrphan": {
"UnpublishConnectionDetailsDeletionPolicyDeleteOrpahn": {
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Typo in test case name: "Orphahn" → "Orphan".

Hey, small catch here — it looks like a transposition crept in during the revert. The test case key reads "UnpublishConnectionDetailsDeletionPolicyDeleteOrpahn" but should be "UnpublishConnectionDetailsDeletionPolicyDeleteOrphan". Could you fix this? 🙂

🔤 Proposed fix
-		"UnpublishConnectionDetailsDeletionPolicyDeleteOrpahn": {
+		"UnpublishConnectionDetailsDeletionPolicyDeleteOrphan": {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"UnpublishConnectionDetailsDeletionPolicyDeleteOrpahn": {
"UnpublishConnectionDetailsDeletionPolicyDeleteOrphan": {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/reconciler/managed/reconciler_legacy_test.go` at line 89, The test case
map contains a typo in the key
"UnpublishConnectionDetailsDeletionPolicyDeleteOrpahn"; rename this key to
"UnpublishConnectionDetailsDeletionPolicyDeleteOrphan" in the test table within
reconciler_legacy_test.go so the test name is spelled correctly (search for the
existing map entry with the incorrect key and replace it with the corrected
string); no other code logic changes are required.

@phisco phisco merged commit e7dec5e into crossplane:main Feb 17, 2026
11 checks passed
@github-actions
Copy link

Successfully created backport PR for release-2.2:

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.

2 participants