Repository navigation
test(translator): cover sectionName on merged Gateways with same-named listeners - #10379
vvoytovych wants to merge 2 commits into
Conversation
…d listeners With mergeGateways, two Gateways can each have a listener of the same name in one shared IR. A policy that targets one Gateway by sectionName must attach to that Gateway's listener only. This golden test fails if the lookup matches the section name alone, across every Gateway. Signed-off-by: Viktor Voytovych <[email protected]>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10379 +/- ##
=======================================
Coverage 82.72% 82.73%
=======================================
Files 277 277
Lines 44455 44455
=======================================
+ Hits 36774 36778 +4
+ Misses 7680 7676 -4
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
Thanks for the approval, @zirain. This is ready to merge whenever a maintainer has a moment. |
What this PR does / why we need it:
This adds the test I promised when I closed #10099.
#10062 fixed #10097: with
mergeGateways, an extension server policy now attaches only to its target Gateway's listeners. Its test gives every listener its own name, so it does not cover one case. Two merged Gateways each have a listener with the same name, and a policy targets one of them bysectionName.In the new golden test,
gateway-1andgateway-2both havehttpandhttp-altlisteners. One policy targetsgateway-1, and one targetsgateway-1withsectionName: http-alt. Both attach togateway-1's listeners only.I checked that the test can fail. If the lookup matches the section name alone, across every Gateway, this test fails and
extensionpolicy-with-gateway-target-mergedstill passes.It only adds test data, so there is no release note.
Which issue(s) this PR fixes:
Fixes #10097
PR Checklist
git commit -s). See DCO: Sign your work./api.make lintandgo test ./internal/gatewayapi/...pass locally. No Go code changes.-override-testdata=true.