Skip to content

fix(xds): keep indexed HTTP filters within their own order band - #10063

Closed
zhaohuabing wants to merge 1 commit into
envoyproxy:mainfrom
zhaohuabing:fix-indexed-filter-order
Closed

zhaohuabing wants to merge 1 commit into
envoyproxy:mainfrom
zhaohuabing:fix-indexed-filter-order

Conversation

@zhaohuabing

Copy link
Copy Markdown
Member

Filter types that can appear more than once on a listener get their position in the chain by adding the index within the type to the type's base order. Lua starts at 13, and a filter the ordering does not recognize gets 50, so a listener with 38 Lua filters sorts the last of them after those, and at 88 they reach ext_proc at 100. Ext_proc, wasm and dynamic modules have the same shape, with less headroom in some cases than it looks.

Keeping the index as a separate sort key, compared after the order and before the name, means a type's filters can never reach the next type's position however many of them there are. Relative ordering is unchanged for every case that fits today, so no generated configuration moves.

The new test fails without the fix at exactly the 38th Lua filter.

Filter types that can appear several times on a listener got their order by
adding the index within the type to the type's base order. Lua starts at 13 and
filters the ordering does not recognize sit at 50, so a listener with 38 Lua
filters sorted its last ones after those, and at 88 they reached ext_proc at 100.
The same applies to ext_proc, wasm and dynamic modules.

Keep the index as a separate sort key instead, compared after the order and
before the name, so a type's filters can never reach the next type's position.

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
@zhaohuabing
zhaohuabing requested a review from a team as a code owner September 21, 2026 05:55
@netlify

netlify Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

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

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

@zhaohuabing

Copy link
Copy Markdown
Member Author

Folding this into #10056 instead — it sits naturally with the Lua slot work that surfaced it.

@zhaohuabing
zhaohuabing deleted the fix-indexed-filter-order branch September 21, 2026 05:59
@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.35%. Comparing base (3ec9a01) to head (a21fe20).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10063      +/-   ##
==========================================
+ Coverage   81.31%   81.35%   +0.03%     
==========================================
  Files         264      264              
  Lines       40994    40998       +4     
==========================================
+ Hits        33336    33355      +19     
+ Misses       7657     7642      -15     
  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.

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.

1 participant