Skip to content

fix ListenerSet conformance test#8910

Closed
zirain wants to merge 1 commit into
envoyproxy:mainfrom
zirain:rebase-8361
Closed

fix ListenerSet conformance test#8910
zirain wants to merge 1 commit into
envoyproxy:mainfrom
zirain:rebase-8361

Conversation

@zirain

@zirain zirain commented May 4, 2026

Copy link
Copy Markdown
Member

Replace #8361

@zirain zirain requested a review from a team as a code owner May 4, 2026 11:25
@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit b125f9b
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a277ef94047cb00086a594f
😎 Deploy Preview https://deploy-preview-8910--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.

@zirain zirain added this to the v1.8.0 Release milestone May 4, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 202af4ea0e

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

Comment thread internal/gatewayapi/validate.go Outdated
@codecov

codecov Bot commented May 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.14634% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.94%. Comparing base (04aadb9) to head (b125f9b).

Files with missing lines Patch % Lines
internal/gatewayapi/validate.go 82.43% 31 Missing and 5 partials ⚠️
internal/gatewayapi/listenerset.go 85.71% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8910      +/-   ##
==========================================
+ Coverage   74.87%   74.94%   +0.07%     
==========================================
  Files         252      252              
  Lines       40792    40945     +153     
==========================================
+ Hits        30542    30687     +145     
- Misses       8168     8169       +1     
- Partials     2082     2089       +7     

☔ 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 May 4, 2026

Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fdfcdd87e6

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

Comment thread internal/gatewayapi/validate.go Outdated
@jukie

jukie commented May 12, 2026

Copy link
Copy Markdown
Contributor

@codex

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

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

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/gatewayapi/helpers.go
Comment thread internal/gatewayapi/listener.go Outdated
jukie
jukie previously approved these changes May 12, 2026
@jukie jukie requested review from a team May 12, 2026 13:25
@jukie

jukie commented May 13, 2026

Copy link
Copy Markdown
Contributor

@codex review

Comment thread internal/gatewayapi/listener.go Outdated
@jukie jukie requested review from a team and jukie May 13, 2026 14:29
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

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

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/gatewayapi/contexts.go Outdated
Comment on lines +277 to +280
// No conditions yet means it will be set to ready during validation.
if len(conditions) == 0 {
return true
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This can be dropped. If there's no conditions the for loop gets skipped already.

Suggested change
// No conditions yet means it will be set to ready during validation.
if len(conditions) == 0 {
return true
}

Comment thread internal/gatewayapi/validate.go Outdated
Comment on lines +344 to +345
// skip computing IR
return

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this actually skip anything? I think this can be dropped.

Suggested change
// skip computing IR
return

Comment thread internal/gatewayapi/validate.go Outdated
Comment on lines +824 to +842
// Per-gateway check: within each gateway, listeners on the same port must use compatible protocols.
// HTTPS and TLS are considered compatible with each other but not with HTTP or TCP.
for _, gateway := range gateways {
portListenerInfo := collectPortListeners(gateway.listeners)
markProtocolConflicts(portListenerInfo)
}

// In merge mode, also check for protocol conflicts across all gateways that share
// the same infra port, since they share the same IR key. A Gateway with HTTP/80
// and another with TCP/80 would each pass the per-gateway check above (single
// listener per gateway), but must still be flagged as conflicted in merge mode.
if t.MergeGateways {
var allListeners []*ListenerContext
for _, gateway := range gateways {
allListeners = append(allListeners, gateway.listeners...)
}
portListenerInfo := collectPortListeners(allListeners)
markProtocolConflicts(portListenerInfo)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In merged gateways mode this would loop over all gateways twice.

Suggested change
// Per-gateway check: within each gateway, listeners on the same port must use compatible protocols.
// HTTPS and TLS are considered compatible with each other but not with HTTP or TCP.
for _, gateway := range gateways {
portListenerInfo := collectPortListeners(gateway.listeners)
markProtocolConflicts(portListenerInfo)
}
// In merge mode, also check for protocol conflicts across all gateways that share
// the same infra port, since they share the same IR key. A Gateway with HTTP/80
// and another with TCP/80 would each pass the per-gateway check above (single
// listener per gateway), but must still be flagged as conflicted in merge mode.
if t.MergeGateways {
var allListeners []*ListenerContext
for _, gateway := range gateways {
allListeners = append(allListeners, gateway.listeners...)
}
portListenerInfo := collectPortListeners(allListeners)
markProtocolConflicts(portListenerInfo)
}
// Detect listeners that share a port but use incompatible protocols.
// HTTPS and TLS may coexist; HTTP and TCP may not coexist with anything else on the same port.
//
// In merge mode, all gateways collapse to a single IR key, so listeners must be
// checked across the full set. Otherwise, conflicts are scoped per gateway.
if t.MergeGateways {
var all []*ListenerContext
for _, g := range gateways {
all = append(all, g.listeners...)
}
markProtocolConflicts(collectPortListeners(all))
} else {
for _, g := range gateways {
markProtocolConflicts(collectPortListeners(g.listeners))
}
}

@zirain

zirain commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

replaced by #9192 and #9196

@zirain zirain closed this Jun 10, 2026
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.

3 participants