-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Topic Name an immutable field (#65)
Issue [#2196](aws-controllers-k8s/community#2196) Description of changes: * Make topic name immutable * Add e2e test checking for error after topic name change By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information
1 parent
6c63feb
commit 73c06a1
Showing
9 changed files
with
54 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
ack_generate_info: | ||
build_date: "2024-10-24T02:09:19Z" | ||
build_hash: 36c2d234498c2bc4f60773ab8df632af4067f43b | ||
build_date: "2024-10-25T16:48:58Z" | ||
build_hash: ab15f9206796e9660c51695fab0ff07a09ea28e2 | ||
go_version: go1.23.2 | ||
version: v0.39.1 | ||
version: v0.39.1-2-gab15f92 | ||
api_directory_checksum: 07a2ec03f194442b69cf147a88a4cc33badaa895 | ||
api_version: v1alpha1 | ||
aws_sdk_go_version: v1.49.0 | ||
generator_config_info: | ||
file_checksum: e95b5fd9a0571826102c9546eae4cc73228a8395 | ||
file_checksum: da7d9b038cf0421583a14109fe0e04628911ab69 | ||
original_file_name: generator.yaml | ||
last_modification: | ||
reason: API generation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
12 changes: 5 additions & 7 deletions
12
templates/hooks/topic/sdk_get_attributes_pre_set_output.go.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
|
||
// If the Name field is empty, populate it with the last part of the topic ARN | ||
// Populate the name field with the last part of the topic ARN | ||
// This is a workaround for the fact that the Name field is required by the | ||
// CreateTopic API call, but not by the GetTopicAttributes API call | ||
// Use case: adopting an existing topic by topic ARN | ||
if ko.Spec.Name == nil { | ||
topicName, err := rm.getTopicNameFromARN(tmpARN) | ||
if err != nil { | ||
return nil, err | ||
} | ||
ko.Spec.Name = &topicName | ||
topicName, err := rm.getTopicNameFromARN(tmpARN) | ||
if err != nil { | ||
return nil, err | ||
} | ||
ko.Spec.Name = &topicName | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters