Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(fieldpath): Handle case differences in structure member names #522

Merged

Conversation

a-hilaly
Copy link
Member

This patch updates the memberShapeRef function in the fieldpath
package to handle case differences between struct member names in the
ACK model and the AWS SDK Model.

Previously, the function assumed that member names in the ACK model and
AWS SDK model were identical. However, this is not always the case, as
some field names may have different casing (e.g AWSVPCConfiguration in
the ACK model and AwsVpcConfiguration in the AWS SDK model).

To address this issue, the function now leverages strings.EqualFold to
compare the member names case isensitively.

Signed-off-by: Amine Hilaly hilalyamine@gmail.com

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

ack-prow bot commented Mar 24, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ack-prow ack-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 24, 2024
@a-hilaly a-hilaly marked this pull request as ready for review March 24, 2024 19:58
@ack-prow ack-prow bot requested review from jlbutler and jljaco March 24, 2024 19:58
@ack-prow ack-prow bot added approved and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Mar 24, 2024
@a-hilaly a-hilaly force-pushed the case-insensitive-member-lookup branch from 205f270 to 8efc8b8 Compare March 24, 2024 20:03
This patch updates the `memberShapeRef` function in the `fieldpath`
package to handle case differences between struct member names in the
ACK model and the AWS SDK Model.

Previously, the function assumed that member names in the ACK model and
AWS SDK model were identical. However, this is not always the case, as
some field names may have different casing (e.g `AWSVPCConfiguration` in
the ACK model and `AwsVpcConfiguration` in the AWS SDK model).

To address this issue, the function now leverages `strings.EqualFold` to
compare the member names case isensitively.

Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>
@a-hilaly a-hilaly force-pushed the case-insensitive-member-lookup branch from 8efc8b8 to d11714d Compare March 24, 2024 20:05
@a-hilaly
Copy link
Member Author

/retest

3 similar comments
@a-hilaly
Copy link
Member Author

/retest

@a-hilaly
Copy link
Member Author

/retest

@a-hilaly
Copy link
Member Author

/retest

@jlbutler
Copy link

/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2024
Copy link

ack-prow bot commented Mar 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, jlbutler

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow ack-prow bot merged commit 0bf7808 into aws-controllers-k8s:main Mar 25, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants