Skip to content

fix ListenerSet conformance test#8910

Open
zirain wants to merge 6 commits into
envoyproxy:mainfrom
zirain:rebase-8361
Open

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

Conversation

@zirain
Copy link
Copy Markdown
Member

@zirain zirain commented May 4, 2026

Replace #8361

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

netlify Bot commented May 4, 2026

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 88dee38
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a05284768f0130008d85de7
😎 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
Copy link
Copy Markdown

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

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
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 83.60000% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.84%. Comparing base (847a3cd) to head (88dee38).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
internal/gatewayapi/validate.go 82.60% 31 Missing and 5 partials ⚠️
internal/gatewayapi/listenerset.go 85.71% 2 Missing and 1 partial ⚠️
internal/gatewayapi/contexts.go 83.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8910      +/-   ##
==========================================
+ Coverage   74.81%   74.84%   +0.03%     
==========================================
  Files         251      251              
  Lines       40417    40574     +157     
==========================================
+ Hits        30236    30367     +131     
- Misses       8115     8129      +14     
- Partials     2066     2078      +12     

☔ View full report in Codecov by Sentry.
📢 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
Copy link
Copy Markdown
Member Author

zirain commented May 4, 2026

@codex

Copy link
Copy Markdown

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

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
Copy link
Copy Markdown
Contributor

jukie commented May 12, 2026

@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
Copy link
Copy Markdown
Contributor

jukie commented May 13, 2026

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

zirain added 3 commits May 14, 2026 09:41
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
zirain added 3 commits May 14, 2026 09:41
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
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 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 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))
}
}

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