Skip to content

feat: emit warning policy status - #9896

Open
kkk777-7 wants to merge 2 commits into
envoyproxy:mainfrom
kkk777-7:emit-warning-policy-status
Open

kkk777-7 wants to merge 2 commits into
envoyproxy:mainfrom
kkk777-7:emit-warning-policy-status

Conversation

@kkk777-7

@kkk777-7 kkk777-7 commented Aug 29, 2026 •

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Currently, all policy status report Accepted=true even when translator doesn't generate IR config.
This case happens when policy attaches some Gateway or ListenerSet and those listeners aren't attached with xRoutes.

Fixed: emit NoAttachedRoutes Reason with Warning condition.

Which issue(s) this PR fixes:

Fixes #9837


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: If this PR contains API changes (changes under /api), the API was discussed and agreed before the implementation. The API change can be in a separate PR, or in the same PR, but the API must be agreed before implementation. N/A if this PR does not contain API changes.
  • Required checks pass: make generate gen-check, make lint, and the unit-test/coverage build pass. (Flaky e2e failures are not considered breakages, but gen-check, lint, and coverage MUST pass.)
  • Tests added/updated: New/changed code is covered by appropriate tests. N/A if this PR does not contain code changes.
  • Docs: User-facing changes update the docs, either in this PR or a follow-up PR. N/A if this PR does not contain user-facing changes.
  • Release notes: For any non-trivial change, added a release-note fragment under release-notes/current/<section>/<pr-number>-<slug>.md (see release-notes/current/README.md for sections and naming). N/A if this PR does not contain non-trivial changes.
  • Generated files committed: Ran make gen-check and committed the result if API/helm charts/modules changed.
  • Scope & compatibility: The PR is reasonably scoped (no unrelated changes) and preserves backward compatibility, or any breaking change is called out above and documented in release-notes/current/breaking_changes/.
  • Codex review: Requested a Codex review and addressed all of its comments.
  • Copilot review: Requested a Copilot review and addressed all of its comments.

@netlify

netlify Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

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

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

@codecov

codecov Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.18182% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.34%. Comparing base (513b511) to head (5381b19).

Files with missing lines Patch % Lines
internal/gatewayapi/backendtrafficpolicy.go 96.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9896      +/-   ##
==========================================
+ Coverage   81.33%   81.34%   +0.01%     
==========================================
  Files         264      264              
  Lines       40967    41002      +35     
==========================================
+ Hits        33320    33353      +33     
- Misses       7646     7648       +2     
  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.

@kkk777-7
kkk777-7 marked this pull request as ready for review August 30, 2026 07:46
@kkk777-7
kkk777-7 requested a review from a team as a code owner August 30, 2026 07:46
@kkk777-7

Copy link
Copy Markdown
Member Author

@codex review

@kkk777-7

Copy link
Copy Markdown
Member Author

/retest

@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: acb606f410

ℹ️ 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/backendtrafficpolicy.go Outdated
@kkk777-7
kkk777-7 force-pushed the emit-warning-policy-status branch from acb606f to 1502c88 Compare September 1, 2026 13:17
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@kkk777-7
kkk777-7 force-pushed the emit-warning-policy-status branch from 1502c88 to 2454452 Compare September 6, 2026 02:29
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@kkk777-7

kkk777-7 commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

@codex review

@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: 5381b1907f

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

setIfNil(&route.LoadBalancer, tf.LoadBalancer),
setIfNil(&route.DNS, tf.DNS),
}
hasApplicableRoute = hasApplicableRoute || slices.Contains(offered, true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Count merged backend-cluster settings as applicable

When mergeBackends is enabled, a whole-Gateway BackendTrafficPolicy containing a cluster-scoped setting such as circuitBreaker can be applied to a UDP route through x.BackendClusters: lines 1810-1817 copy tf.ClusterTrafficFeatures into every merged cluster, and the merged-cluster translator consumes those settings. However, the UDP applicability check only considers load balancing and DNS, so this scenario leaves hasApplicableRoute false and reports NoAttachedRoutes even though the policy is present in the generated cluster configuration. Include settings applied through the merged backend-cluster path when determining applicability.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This comment is right. but in my opinion, merge backend behavior is uncorrect.
Only features appropriate for merge backend of each protocol should be applied.
This is different issue, so I'd like to raise another issue and handle this in different PR.

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.

Policy status report Accepted=true even when don't generate IR config.

1 participant