mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-16 22:27:34 +00:00
Address remaining comments on pr #25
This commit is contained in:
@@ -265,8 +265,8 @@ func DeleteAppliedResources(resources []workapiv1.AppliedManifestResourceMeta, d
|
||||
}
|
||||
|
||||
pendingFinalization := u.GetDeletionTimestamp() != nil && !u.GetDeletionTimestamp().IsZero()
|
||||
waitingForFinalization := len(resource.UID) > 0
|
||||
if pendingFinalization {
|
||||
waitingForFinalization := len(resource.UID) > 0
|
||||
if waitingForFinalization && resource.UID != string(u.GetUID()) {
|
||||
// the instance is deleted, so do not add to the resourcesPendingDeletion list
|
||||
continue
|
||||
@@ -280,7 +280,7 @@ func DeleteAppliedResources(resources []workapiv1.AppliedManifestResourceMeta, d
|
||||
}
|
||||
|
||||
// forget this item if the UID does not match the resource UID we previously deleted
|
||||
if len(resource.UID) > 0 && resource.UID != string(u.GetUID()) {
|
||||
if waitingForFinalization && resource.UID != string(u.GetUID()) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -391,7 +391,7 @@ var _ = ginkgo.Describe("ManifestWork", func() {
|
||||
})
|
||||
|
||||
ginkgo.Context("Foreground deletion", func() {
|
||||
var finalizer = "a.b.c/d"
|
||||
var finalizer = "cluster.open-cluster-management.io/testing"
|
||||
ginkgo.BeforeEach(func() {
|
||||
manifests = []workapiv1.Manifest{
|
||||
util.ToManifest(util.NewConfigmap(o.SpokeClusterName, "cm1", map[string]string{"a": "b"}, []string{finalizer})),
|
||||
|
||||
Reference in New Issue
Block a user