Skip to content

Only include relevant snippets (#3586) #3591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: release-2.0
Choose a base branch
from

Conversation

ciarams87
Copy link
Contributor

Cherrypick of #3586

Problem: SnippetsFilters are being included in NGINX configuration for all gateways regardless of whether routes attached to those specific gateways actually referenced the filters.

Solution: Implemented gateway-specific scoping by adding GetReferencedSnippetsFilters() method that returns only SnippetsFilters referenced by routes attached to the current gateway.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

Fixed an issue where SnippetsFilters were being included in NGINX configuration for all gateways regardless of whether routes attached to those specific gateways actually referenced the filters.

Problem: SnippetsFilters are being included in NGINX configuration for all gateways regardless of whether routes attached to those specific gateways actually referenced the filters.

Solution: Implemented gateway-specific scoping by adding GetReferencedSnippetsFilters() method that returns only SnippetsFilters referenced by routes attached to the current gateway.
@ciarams87 ciarams87 requested a review from a team as a code owner July 3, 2025 21:48
@github-actions github-actions bot added the bug Something isn't working label Jul 3, 2025
Copy link

codecov bot commented Jul 3, 2025

Codecov Report

Attention: Patch coverage is 84.09091% with 7 lines in your changes missing coverage. Please review.

Project coverage is 86.81%. Comparing base (51cf307) to head (c8fbf14).

Files with missing lines Patch % Lines
internal/controller/state/graph/gateway.go 81.57% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           release-2.0    #3591   +/-   ##
============================================
  Coverage        86.80%   86.81%           
============================================
  Files              127      127           
  Lines            15087    15127   +40     
  Branches            62       62           
============================================
+ Hits             13096    13132   +36     
- Misses            1840     1841    +1     
- Partials           151      154    +3     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release-notes
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

3 participants