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

feat: emit warning policy status#9896
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 don't generate IR config.
This case happen when policy attach 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 1502c88
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a96d06d7b7445000877e79b
😎 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 95.34884% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.30%. Comparing base (0008ac8) to head (1502c88).

Files with missing lines Patch % Lines
internal/gatewayapi/backendtrafficpolicy.go 87.50% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9896   +/-   ##
=======================================
  Coverage   81.29%   81.30%           
=======================================
  Files         263      263           
  Lines       40870    40903   +33     
=======================================
+ Hits        33227    33256   +29     
- Misses       7643     7647    +4     

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

continue
}

hasApplicableRoute = 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 Only count protocol-compatible BTP routes

When a BackendTrafficPolicy contains only HTTP-specific settings such as retry and targets a UDP listener with an attached UDPRoute, this unconditionally marks the route applicable even though the UDP branch only applies load-balancer and DNS settings. The policy therefore remains absent from generated configuration but does not receive the new NoAttachedRoutes warning; the analogous unconditional TCP check has the same issue. Determine applicability from the configured features that can actually be applied to each protocol rather than merely from route presence.

Useful? React with 👍 / 👎.

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@kkk777-7
kkk777-7 force-pushed the emit-warning-policy-status branch from acb606f to 1502c88 Compare September 1, 2026 13:17
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