Skip to content

test(translator): cover sectionName on merged Gateways with same-named listeners - #10379

Open
vvoytovych wants to merge 2 commits into
envoyproxy:mainfrom
vvoytovych:test/extension-policy-merged-same-listener-names
Open

vvoytovych wants to merge 2 commits into
envoyproxy:mainfrom
vvoytovych:test/extension-policy-merged-same-listener-names

Conversation

@vvoytovych

Copy link
Copy Markdown

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 by sectionName.

In the new golden test, gateway-1 and gateway-2 both have http and http-alt listeners. One policy targets gateway-1, and one targets gateway-1 with sectionName: http-alt. Both attach to gateway-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-merged still passes.

It only adds test data, so there is no release note.

Which issue(s) this PR fixes:

Fixes #10097


PR Checklist

  • Authorship & ownership: Coding agents / AI assistants are welcome, but I have reviewed every change, understand how and why it works, can explain and maintain it, and take full responsibility for this PR. I have not submitted generated output I do not understand.
  • DCO: All commits are signed off (git commit -s). See DCO: Sign your work.
  • API agreed first: N/A: no changes under /api.
  • Required checks pass: make lint and go test ./internal/gatewayapi/... pass locally. No Go code changes.
  • Tests added/updated: this PR is the test.
  • Docs: N/A: no user-facing change.
  • Release notes: N/A: test data only.
  • Generated files committed: N/A: no API, Helm chart or module change. The golden file comes from -override-testdata=true.
  • Scope & compatibility: two test files, no code change.
  • Codex review: Requested a Codex review and addressed all of its comments.
  • Copilot review: Requested a Copilot review and addressed all of its comments.

…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]>
@netlify

netlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 331b114
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6af1b53c2f0bde366f561618
😎 Deploy Preview https://deploy-preview-10379--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vvoytovych
vvoytovych marked this pull request as ready for review October 26, 2026 12:15
@vvoytovych
vvoytovych requested a review from a team as a code owner October 26, 2026 12:16
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T12:48:39.364392Z 331b114 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.73%. Comparing base (67f3a1c) to head (331b114).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zirain

zirain commented Nov 9, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 331b114060

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@vvoytovych

Copy link
Copy Markdown
Author

Thanks for the approval, @zirain. This is ready to merge whenever a maintainer has a moment.

This branch has not been deployed

No deployments
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.

Extension server policies attach to every Gateway's listeners when mergeGateways is enabled

2 participants