Skip to content

Commit 7f83d3f

Browse files
committed
Address review comments
1 parent 2ec9ff2 commit 7f83d3f

File tree

7 files changed

+14
-30
lines changed

7 files changed

+14
-30
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ack_generate_info:
2-
build_date: "2023-02-08T09:29:24Z"
2+
build_date: "2023-02-15T08:28:41Z"
33
build_hash: 92c80ba0af0d3c80ed9d16126957523052fac5f4
44
go_version: go1.19.5
55
version: v0.23.1-4-g92c80ba
6-
api_directory_checksum: 1ac2283882031c5ed4a4f0845b2cf36ed30c6c8a
6+
api_directory_checksum: 13665bb0d4461bf92da1197abb0ae688985a1b21
77
api_version: v1alpha1
88
aws_sdk_go_version: v1.44.97
99
generator_config_info:
10-
file_checksum: 950bbaa5e73bc28b57da7281a258c2226836ae2c
10+
file_checksum: a539095edd22bd980991e360c5d5ca60f87c8ef4
1111
original_file_name: generator.yaml
1212
last_modification:
1313
reason: API generation

apis/v1alpha1/archive.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/v1alpha1/generator.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ resources:
2525
resource: EventBus
2626
path: Status.ACKResourceMetadata.ARN
2727
tags:
28-
ignore: true
28+
ignore: true # API does not support tags
2929
hooks:
3030
sdk_create_post_set_output:
3131
template_path: hooks/archive/sdk_create_post_set_output.go.tpl
@@ -35,17 +35,11 @@ resources:
3535
template_path: hooks/archive/sdk_update_post_build_request.go.tpl
3636
print:
3737
add_age_column: true
38-
add_synced_column: false
38+
add_synced_column: true
3939
additional_columns:
4040
- name: ARN
4141
json_path: .status.ackResourceMetadata.arn
4242
type: string
43-
- name: SYNCED
44-
json_path: .status.conditions[?(@.type=="ACK.ResourceSynced")].status
45-
type: string
46-
- name: STATE
47-
json_path: .status.state
48-
type: string
4943
exceptions:
5044
errors:
5145
404:

config/crd/bases/eventbridge.services.k8s.aws_archives.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@ spec:
1919
- jsonPath: .status.ackResourceMetadata.arn
2020
name: ARN
2121
type: string
22-
- jsonPath: .status.state
23-
name: STATE
24-
type: string
2522
- jsonPath: .status.conditions[?(@.type=="ACK.ResourceSynced")].status
26-
name: SYNCED
23+
name: Synced
2724
type: string
2825
- jsonPath: .metadata.creationTimestamp
2926
name: Age

helm/crds/eventbridge.services.k8s.aws_archives.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@ spec:
1919
- jsonPath: .status.ackResourceMetadata.arn
2020
name: ARN
2121
type: string
22-
- jsonPath: .status.state
23-
name: STATE
24-
type: string
2522
- jsonPath: .status.conditions[?(@.type=="ACK.ResourceSynced")].status
26-
name: SYNCED
23+
name: Synced
2724
type: string
2825
- jsonPath: .metadata.creationTimestamp
2926
name: Age

pkg/resource/archive/sdk.go

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
if archiveInTerminalState(latest) {
2-
msg := "Archive is in '" + *latest.ko.Status.State + "' status"
2+
msg := fmt.Sprintf("Archive is in status %q", *latest.ko.Status.State)
33
ackcondition.SetTerminal(desired, corev1.ConditionTrue, &msg, nil)
44
ackcondition.SetSynced(desired, corev1.ConditionTrue, nil, nil)
55
return desired, nil
66
}
77

88
if archiveCreating(latest) {
9-
msg := "Archive is currently being created"
9+
msg := fmt.Sprintf("Archive is in status %q", *latest.ko.Status.State)
1010
ackcondition.SetSynced(desired, corev1.ConditionFalse, &msg, nil)
1111
return desired, requeueWaitUntilCanModify(latest)
1212
}
1313

1414
if !archiveAvailable(latest) {
15-
msg := "Archive is not available for modification in '" +
16-
*latest.ko.Status.State + "' status"
15+
msg := fmt.Sprintf("Archive is not available for modification in status %q", *latest.ko.Status.State)
1716
ackcondition.SetSynced(desired, corev1.ConditionFalse, &msg, nil)
1817
return desired, requeueWaitUntilCanModify(latest)
1918
}

0 commit comments

Comments
 (0)