resourceactuation: halt delete operations when actuation-mode is Paused - #13654
hopper-coder-bot wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
🤖 AI Factory started investigating CI check failures for this pull request. Note: We recommend waiting for the 'ready-for-human' label before leaving review comments. Comments added while the system is actively working may be associated with outdated commits once a new commit is pushed, causing them to be ignored. |
Investigating tests-e2e-fixtures-container-1-of-2 failureRun: 36983412444 (This report was generated by overseer) |
|
Thanks for working on this! A couple of quick suggestions: 1. Run Scenario Test Against Real GCPPlease record the scenario golden files against real GCP first, then verify Mock GCP alignment: ./hack/record-gcp TestE2EScript/scenarios/resource_pause_deleteAlso please add a brief note in 2. Add Predicate Unit Tests for Unpausing via RemovalPlease add test cases in [
|
|
🤖 AI Factory started addressing review feedback for this pull request. |
- Remove the isDeleting bypass for opv1beta1.Paused in ShouldSkipActuation so that resource-level pause halts deletion as well. - Trigger reconciliations on changes to cnrm.cloud.google.com/actuation-mode in UnderlyingResourceOutOfSyncPredicate. - Update unit tests in resourceactuation_test.go and add unit test in predicate_test.go. - Add an end-to-end scenario test in tests/e2e/testdata/scenarios/resource_pause_delete/. Fix: 13650
22f1360 to
7225844
Compare
|
Thanks for the review! I have addressed your suggestions in the latest commit:
(This comment was generated by overseer) |
|
🤖 AI Factory started investigating CI check failures for this pull request. Note: We recommend waiting for the 'ready-for-human' label before leaving review comments. Comments added while the system is actively working may be associated with outdated commits once a new commit is pushed, causing them to be ignored. |
Investigating tests-e2e-fixtures-container-1-of-2 failureRun: 37068660821 Investigating tests-e2e-fixtures-iam failureRun: 37068660821 (This report was generated by overseer) |
Summary
This PR updates
ShouldSkipActuationso that settingcnrm.cloud.google.com/actuation-mode: "Paused"halts delete operations as well as create/update/drift operations on individual resources.Details & Rationale
pkg/controller/resourceactuation/resourceactuation.go:if isDeletingbypass foropv1beta1.Paused. Now, when an individual resource is annotated withcnrm.cloud.google.com/actuation-mode: "Paused", deletion operations against GCP are skipped, retaining finalizers and leaving the resource inTerminatingstate until unpaused.Pausedskips Create/Update/Drift and Deletion operations.pkg/controller/predicate/predicate.go:k8s.ActuationModeAnnotationchecks toUnderlyingResourceOutOfSyncPredicate.Updateso that modifying or removing the actuation mode annotation immediately enqueues the resource for reconciliation (e.g. to resume deletion when unpaused).pkg/controller/predicate/predicate_test.go.Testing:
pkg/controller/resourceactuation/resourceactuation_test.go.tests/e2e/testdata/scenarios/resource_pause_delete/with golden logs and verified behavior against mock GCP.Fixes #13650
This PR was generated by the overseer agent (powered by the gemini-3.7-flash model).