Skip to content

Conversation

@knottnt
Copy link
Contributor

@knottnt knottnt commented Jun 18, 2025

Issue #, if available:

Description of changes:

  • Add Test case for mapping string to secrets references
  • Update CleanGoType to update value type of map to SecretKeyReference if is_secret set.
  • Add tests validating SetSDK() for map of secrets references

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

- Add Test case for mapping string to secrets references

- Update CleanGoType to update value type of map to SecretKeyReference if is_secret set.

- Add tests validating SetSDK() for map of secrets references
@ack-prow ack-prow bot requested review from a-hilaly and jlbutler June 18, 2025 23:02
@ack-prow ack-prow bot added the approved label Jun 18, 2025
if r.ko.Spec.Environment != nil {
f4 := &svcsdktypes.Environment{}
if r.ko.Spec.Environment.Variables != nil {
f4f0 := map[string]string{}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes to SetSDK were necessary, but there don't appear to be any tests validating the generated code for a map of secrets references. I was also able to verify that key/value pair of secrets references are written out as expected using a modified version of the lambda-controller.

@knottnt knottnt requested review from michaelhtm and removed request for jlbutler June 18, 2025 23:04
@knottnt
Copy link
Contributor Author

knottnt commented Jun 19, 2025

/retest

@knottnt
Copy link
Contributor Author

knottnt commented Jun 19, 2025

/test ec2-controller-test

2 similar comments
@rushmash91
Copy link
Member

/test ec2-controller-test

@knottnt
Copy link
Contributor Author

knottnt commented Jun 19, 2025

/test ec2-controller-test

@knottnt
Copy link
Contributor Author

knottnt commented Jun 20, 2025

/retest

@ack-prow
Copy link

ack-prow bot commented Jun 20, 2025

@knottnt: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
verify-attribution bc9bd45 link false /test verify-attribution
s3-olm-test bc9bd45 link false /test s3-olm-test

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


gt = "[]" + mgt
gtwp = "[]" + mgtwp
} else if shape.Type == "map" && fieldCfg != nil && fieldCfg.IsSecret {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need to check for fieldCfg != nil && fieldCfg.IsSecret ? looks like the list case doesn't need it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I check both here is that I only want to enter this block if the field is both a map and is secret whereas the list block needs be entered regardless of the secret status.

Copy link
Member

@a-hilaly a-hilaly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat, thanks Trevor 👍

@a-hilaly
Copy link
Member

/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jun 20, 2025
@ack-prow
Copy link

ack-prow bot commented Jun 20, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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:
  • OWNERS [a-hilaly,knottnt,michaelhtm]

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 a488d4e into aws-controllers-k8s:main Jun 20, 2025
17 of 19 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.

4 participants