Skip to content

Fix crash when BackendRef filter is specified #3508

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

Merged
merged 1 commit into from
Jun 13, 2025
Merged

Conversation

sjberman
Copy link
Collaborator

Problem: When a BackendRef filter is specified in a Route, the control plane crashes due to an index out of range error.

Solution: Fix the way we build the filter list so we don't access an undefined index.

Testing: Verified that the crash no longer occurs.

Closes #3507

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.

Fix crash when BackendRef filter is specified.

Problem: When a BackendRef filter is specified in a Route, the control plane crashes due to an index out of range error.

Solution: Fix the way we build the filter list so we don't access an undefined index.
@sjberman sjberman requested a review from a team as a code owner June 13, 2025 15:37
@github-actions github-actions bot added the bug Something isn't working label Jun 13, 2025
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.82%. Comparing base (6752eaa) to head (0e7bb61).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3508      +/-   ##
==========================================
+ Coverage   86.79%   86.82%   +0.02%     
==========================================
  Files         127      127              
  Lines       15079    15079              
  Branches       62       62              
==========================================
+ Hits        13088    13092       +4     
+ Misses       1840     1836       -4     
  Partials      151      151              

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

@sjberman sjberman enabled auto-merge (squash) June 13, 2025 17:47
@sjberman sjberman merged commit cb719a6 into main Jun 13, 2025
63 of 64 checks passed
@sjberman sjberman deleted the fix/backend-filters branch June 13, 2025 18:01
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NGINX Gateway Fabric Jun 13, 2025
nowjean pushed a commit to nowjean/nginx-gateway-fabric that referenced this pull request Jun 14, 2025
Problem: When a BackendRef filter is specified in a Route, the control plane crashes due to an index out of range error.

Solution: Fix the way we build the filter list so we don't access an undefined index.
nowjean pushed a commit to nowjean/nginx-gateway-fabric that referenced this pull request Jun 14, 2025
Problem: When a BackendRef filter is specified in a Route, the control plane crashes due to an index out of range error.

Solution: Fix the way we build the filter list so we don't access an undefined index.
nowjean pushed a commit to nowjean/nginx-gateway-fabric that referenced this pull request Jun 14, 2025
Problem: When a BackendRef filter is specified in a Route, the control plane crashes due to an index out of range error.

Solution: Fix the way we build the filter list so we don't access an undefined index.
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: Done
Development

Successfully merging this pull request may close these issues.

Control plane crashes when backendRef filter is specified in a Route
3 participants