Skip to content

Conversation

@u-kai
Copy link
Contributor

@u-kai u-kai commented Feb 16, 2025

What type of PR is this?
Fixes a missing change from PR #709

Which issue does this PR fix:
Fixes a missing change from PR #709
What does this PR do / Why do we need it:
In PR #709, the logic was updated to traverse all Parents in XXXRoute. However, some parts of the implementation were still only checking the first element (ParentRefs[0]), which was an unintended omission.
This PR fixes the logic to correctly traverse all Parents and ensures consistency with the intended behavior.
Additionally, some refactoring was performed to improve maintainability.

If an issue # is not available please add repro steps and logs from aws-gateway-controller showing the issue:

Testing done on this change:

Verified that existing unit tests cover this change and all tests pass
Automation added to e2e:

None
Will this PR introduce any new dependencies?:

None
Will this break upgrades or downgrades. Has updating a running cluster been tested?:
None
Does this PR introduce any user-facing change?:


Do all end-to-end tests successfully pass when running make e2e-test?:

SECONDARY_ACCOUNT_TEST_ROLE_ARN=arn:aws:iam:xxxxxxxxxxxx:role/TestRole REGION=ap-northeast-1  make e2e-test
...
------------------------------
[SynchronizedAfterSuite] 
/Users/kai/aws-application-networking-k8s/test/suites/integration/suite_test.go:72
{"level":"info","ts":"2025-02-16T15:48:07.053+0900","caller":"test/framework.go:266","msg":"Deleting objects: *v1.Gateway/test-gateway, *v1.Pod/grpc-runner"}
{"level":"info","ts":"2025-02-16T15:48:07.090+0900","caller":"test/framework.go:285","msg":"Waiting for NotFound, objects: *v1.Gateway/test-gateway, *v1.Pod/grpc-runner"}
[SynchronizedAfterSuite] PASSED [31.100 seconds]
------------------------------

Ran 69 of 69 Specs in 2756.680 seconds
SUCCESS! -- 69 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestIntegration (2756.68s)
PASS
ok      github.com/aws/aws-application-networking-k8s/test/suites/integration   2757.433s

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

@ghost
Copy link

ghost commented Feb 18, 2025

I've created #717 to address these failing validations.

@ghost
Copy link

ghost commented Feb 19, 2025

Very minor comments, otherwise thank you for simplifying this!

@u-kai
Copy link
Contributor Author

u-kai commented Feb 19, 2025

@rlymbur
Thanks for the review!
I have revised it according to your review.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ghost ghost enabled auto-merge February 19, 2025 16:33
@ghost ghost added this pull request to the merge queue Feb 19, 2025
Merged via the queue into aws:main with commit b0957fc Feb 19, 2025
2 checks passed
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant