Skip to content

Commit 4d8ca54

Browse files
committed
remove getImmutableFieldChanges references
1 parent 8680f83 commit 4d8ca54

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

pkg/resource/key/hooks.go

-8
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@ package key
1515

1616
import (
1717
"context"
18-
"fmt"
1918
"strconv"
20-
"strings"
2119

2220
ackcompare "github.com/aws-controllers-k8s/runtime/pkg/compare"
23-
ackerr "github.com/aws-controllers-k8s/runtime/pkg/errors"
2421
ackrtlog "github.com/aws-controllers-k8s/runtime/pkg/runtime/log"
2522
svcsdk "github.com/aws/aws-sdk-go-v2/service/kms"
2623
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -66,11 +63,6 @@ func (rm *resourceManager) customUpdate(
6663
defer func() {
6764
exit(err)
6865
}()
69-
if immutableFieldChanges := rm.getImmutableFieldChanges(delta); len(immutableFieldChanges) > 0 {
70-
msg := fmt.Sprintf("Immutable Spec fields have been modified: %s",
71-
strings.Join(immutableFieldChanges, ","))
72-
return nil, ackerr.NewTerminalError(fmt.Errorf(msg))
73-
}
7466
updatedRes := rm.concreteResource(desired.DeepCopy())
7567
updatedRes.SetStatus(latest)
7668

test/e2e/tests/test_key.py

-12
Original file line numberDiff line numberDiff line change
@@ -244,18 +244,6 @@ def test_update_key_policy(self, kms_client, key_with_policy):
244244

245245
key_policy = kms_client.get_key_policy(KeyId=key_id, PolicyName='default')
246246
assert 'updated-key-policy' in key_policy['Policy']
247-
248-
# updating description should set terminal condition on the resource
249-
# because only tags and policy related fields can be updated on the Key
250-
# resource
251-
updates = {
252-
"spec": {
253-
"description": 'only policy and tags update are supported'
254-
}
255-
}
256-
k8s.patch_custom_resource(ref, updates)
257-
time.sleep(MODIFY_WAIT_AFTER_SECONDS)
258-
assert k8s.wait_on_condition(ref, "ACK.Terminal", "True", wait_periods=10)
259247

260248
def test_create_with_rotation(self, kms_client, key_with_rotation):
261249
(ref, cr) = key_with_rotation

0 commit comments

Comments
 (0)