Skip to content

Commit

Permalink
Remove subnet UserIDGroupPairs.GroupID references (#192)
Browse files Browse the repository at this point in the history
Partial revert of cd75ad9

Initially our intention was to generate code to reference for both `GroupName`
and `GroupID` fields in the `UserIDGroupPairs`. However what we (I) missed was
that the code-generator processes the references fields, omits "ID" and "Name"
name fields, and infers names for the referenced fields (e.g `GroupName` ->
`GroupRef` and `GroupID` -> `GroupRef`. This confused the ACK code
generator since both `GroupName` and `GroupID` needed a reference field called
`GroupRef`. This caused some confusion at the code generation level, triggering some
validation issues and introduced a regression in our references code.

In a attempt to address the regression, we will first omit one of the references
(GroupID), regenerate the code and address this in the code-generator later on.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
a-hilaly authored May 31, 2024
1 parent 34439b0 commit 63881fe
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 70 deletions.
8 changes: 4 additions & 4 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ack_generate_info:
build_date: "2024-05-22T16:42:26Z"
build_date: "2024-05-31T06:34:31Z"
build_hash: 14cef51778d471698018b6c38b604181a6948248
go_version: go1.21.1
go_version: go1.22.3
version: v0.34.0
api_directory_checksum: 1b53401670898ce50e6d6cc8bfba6b63ea7d5683
api_directory_checksum: 7fd395ceb7d5d8e35906991c7348d3498f384741
api_version: v1alpha1
aws_sdk_go_version: v1.44.93
generator_config_info:
file_checksum: 75820b9d685b38976cd9723a9435f119ab913245
file_checksum: ae36cc7af80031c6de1461fa5fafad17631dbc99
original_file_name: generator.yaml
last_modification:
reason: API generation
4 changes: 0 additions & 4 deletions apis/v1alpha1/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,6 @@ resources:
references:
resource: VPC
path: Status.VPCID
IngressRules.UserIDGroupPairs.GroupID:
references:
resource: SecurityGroup
path: Status.ID
IngressRules.UserIDGroupPairs.GroupName:
references:
resource: SecurityGroup
Expand Down
4 changes: 0 additions & 4 deletions generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,6 @@ resources:
references:
resource: VPC
path: Status.VPCID
IngressRules.UserIDGroupPairs.GroupID:
references:
resource: SecurityGroup
path: Status.ID
IngressRules.UserIDGroupPairs.GroupName:
references:
resource: SecurityGroup
Expand Down
64 changes: 6 additions & 58 deletions pkg/resource/security_group/references.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 63881fe

Please sign in to comment.