Skip to content

fix: nil pointer error when applying BackendTrafficPolicy to HTTPRoute with no backendRefs#7765

Merged
arkodg merged 3 commits intoenvoyproxy:mainfrom
kkk777-7:fix-policy
Dec 19, 2025
Merged

fix: nil pointer error when applying BackendTrafficPolicy to HTTPRoute with no backendRefs#7765
arkodg merged 3 commits intoenvoyproxy:mainfrom
kkk777-7:fix-policy

Conversation

@kkk777-7
Copy link
Copy Markdown
Member

@kkk777-7 kkk777-7 commented Dec 17, 2025

What this PR does / why we need it:
Fixed a nil pointer error when applying BackendTrafficPolicy to HTTPRoutes with no backendRefs.

This is caused by using IR Destination Metadata to compare section name.
We can use Route Metadata, and Route metadata is not nil when the IR has been generated, so use that instead.
(currently use in SecurityPolicy and EnvoyExtensionPolicy)

Which issue(s) this PR fixes:

Fixes #7752

Release Notes: Yes

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@kkk777-7 kkk777-7 requested a review from a team as a code owner December 17, 2025 12:58
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.41%. Comparing base (26a7734) to head (322adb0).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7765      +/-   ##
==========================================
+ Coverage   72.38%   72.41%   +0.03%     
==========================================
  Files         234      234              
  Lines       34566    34566              
==========================================
+ Hits        25020    25031      +11     
+ Misses       7757     7743      -14     
- Partials     1789     1792       +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.

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@arkodg arkodg merged commit cbfc3e2 into envoyproxy:main Dec 19, 2025
30 of 32 checks passed
millermatt pushed a commit to millermatt/envoy-gateway that referenced this pull request Jan 4, 2026
…e with no backendRefs (envoyproxy#7765)

* fix: checking route section name in backend traffic policy

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: Matt Miller <millermatt@outlook.com>
@zirain
Copy link
Copy Markdown
Member

zirain commented Jan 8, 2026

v1.5 didn't support BackendTrafficPolicy target with section name.

rudrakhp pushed a commit to rudrakhp/gateway that referenced this pull request Jan 8, 2026
…e with no backendRefs (envoyproxy#7765)

* fix: checking route section name in backend traffic policy

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>
rudrakhp added a commit that referenced this pull request Jan 9, 2026
* fix: set observedGeneration in envoy patch policy (#7715)

* fix: set observedGeneration in envoy patch policy

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* add release note

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>

* fix: add validation for request buffer limit (#7687)

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>

* fix: nil pointer error when applying BackendTrafficPolicy to HTTPRoute with no backendRefs (#7765)

* fix: checking route section name in backend traffic policy

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>

* fix: setting externalTrafficPolicy for NodePort service type (#7823)

Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>

* fix: add indexing and processing for CRL references in ClientTrafficPolicies (#7829)

Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>

* feat: change the benchmark report to json format (#6818)

* benchmark json output

Signed-off-by: zirain <zirain2009@gmail.com>

* fix

Signed-off-by: zirain <zirain2009@gmail.com>

* fix

Signed-off-by: zirain <zirain2009@gmail.com>

* fix lint

Signed-off-by: zirain <zirain2009@gmail.com>

* fix

Signed-off-by: zirain <zirain2009@gmail.com>

* revert

Signed-off-by: zirain <zirain2009@gmail.com>

* fix seconds

Signed-off-by: zirain <zirain2009@gmail.com>

---------

Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>

* bechmark: scale up RPS to test data plane CPU performance (#7810)

* Scale up RPS to test data plane CPU performance

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

* set duration to 120s

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

* discard invalid samples

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

* change scrape interval to 10s

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

* remove invalid cpu sampling data

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

* reduce duration to 60

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

* fix benchmark end time

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

* fix data plane benchmark start time

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

* increase test time to get more samples

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

* adjust rps for each scale

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>

* address comments

Signed-off-by: Huabing(Robin) Zhao <zhaohuabing@gmail.com>

---------

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing(Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>

* fix: make port-forward worked for OTel collector on port 19001 (#7860)

Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>

* chore: fix goroutine leak (#7880)

fix goroutine leak

Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>

* fix gen-check

Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: Rudrakh Panigrahi <rudrakh97@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing(Robin) Zhao <zhaohuabing@gmail.com>
Co-authored-by: Kota Kimura <86363983+kkk777-7@users.noreply.github.com>
Co-authored-by: zirain <zirain2009@gmail.com>
Co-authored-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic when using SectionName in BackendTrafficPolicy

3 participants