docs(gateway): document the plugin_ordering_algorithm option - #5936
Open
findns94 wants to merge 9 commits into
Open
docs(gateway): document the plugin_ordering_algorithm option#5936findns94 wants to merge 9 commits into
findns94 wants to merge 9 commits into
Conversation
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Gateway reference page explaining how dynamic plugin ordering is computed (including a worked example and a new vs legacy comparison) and wires it into the existing Plugin entity docs and Gateway index navigation.
Changes:
- Adds a standalone explainer page for dynamic plugin ordering behavior and upgrade guidance.
- Updates the Plugin entity reference to link out to the explainer and mentions
plugin_ordering_algorithm. - Adds the new page to the Gateway “How Gateway Works” index section.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| app/gateway/plugins/plugin-ordering.md | New reference page describing the ordering rule/algorithm behavior, examples, and limitations. |
| app/_gateway_entities/plugin.md | Links to the new explainer from the Dynamic plugin ordering section and mentions algorithm selection. |
| app/_indices/gateway.yaml | Adds the new page to the Gateway documentation index/navigation. |
findns94
marked this pull request as draft
July 14, 2026 10:53
…g_algorithm option
Add a standalone explainer for dynamic plugin ordering and document the new
`plugin_ordering_algorithm` option that selects which ordering algorithm runs.
* app/gateway/plugins/plugin-ordering.md (new): the principle behind dynamic
ordering ("at each step, run the highest-priority plugin whose `after`
requirements are already met"), a hand-worked step-by-step example so readers can
predict the exact order, a new-vs-legacy comparison (including the FTI-7177
displacement and the `before` != `after` asymmetry, with concrete sorted results),
the guarantees and non-guarantees, how request scope changes the result, and how
to adopt `new` on upgrade.
* app/_gateway_entities/plugin.md: trim the "Dynamic plugin ordering" reference
section to link to the new explainer, and note the `plugin_ordering_algorithm`
option under known limitations.
* app/_indices/gateway.yaml: add the new page to the "How Gateway Works" navigation.
FTI-7177
Signed-off-by: Walker Zhao <walker.zhao@konghq.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
works_on: - on-prem - konnect Signed-off-by: Walker Zhao <walker.zhao@konghq.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
findns94
force-pushed
the
walker.zhao/FTI-7177
branch
2 times, most recently
from
August 19, 2026 02:06
751cc22 to
4fb064f
Compare
The doc was written against an early build and still called the algorithm "new" -- the shipped option is `legacy` / `priority_preserving` (kong.conf.default). Rename throughout, replace the placeholder A/B/C and e/d/c/b/a examples with real kong-ee plugins and priorities, and add a worked example (with the fix) for the one documented hard limitation: an unconfigured plugin can occasionally move further than a hand-picked order would need, in roughly one configuration in twenty that uses `ordering`. Also fixes a real accuracy bug carried by the old examples: an unconfigured plugin's absolute slot can shift when a mover passes through it, even though its order relative to other unconfigured plugins does not -- the old text claimed it "stays put" / "keeps its place," which wasn't true for the abstract example's `c`. Adds a short section on plugins that share a priority (routine for cloned plugins that don't override it) and bumps min_version to 3.16, matching the changelog entries this doc describes. Signed-off-by: Walker Zhao <walker.zhao@konghq.com>
findns94
force-pushed
the
walker.zhao/FTI-7177
branch
from
August 19, 2026 03:50
4fb064f to
9e0b26f
Compare
findns94
marked this pull request as ready for review
August 19, 2026 03:52
…ing pages One merged page made it hard to say which algorithm produced which behavior. Split it into plugin-ordering-legacy.md and plugin-ordering-priority-preserving.md, each self-contained, and redirect the old URL to the priority_preserving page. The legacy page documents its real mechanism for the first time: a DFS post-order topological sort driven by a priority-ordered outer loop, where before/after build the identical dependency edge and a plugin's whole dependency chain gets appended ahead of everything else the moment the walk reaches it. Verified against the real module (topsort_plugins.lua + plugin_dependency.lua), including that its unguarded recursion does NOT overflow the stack at realistic -- or even 500,000-plugin -- chain lengths, so that is not listed as a limitation. The priority_preserving page keeps last round's content, reorganized so every comparison names which algorithm produced which result, with the legacy contrast moved up next to the worked example instead of appearing several sections later. Updates the two cross-links in plugin.md, the one nav entry in _indices/gateway.yaml, and adds a redirect for the retired URL. Signed-off-by: Walker Zhao <walker.zhao@konghq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add standalone explainers for both dynamic plugin ordering algorithms and document the new
plugin_ordering_algorithmoption that selects which one runs.app/gateway/plugins/plugin-ordering-legacy.md(new): thelegacyalgorithm on its own terms-- its real DFS post-order mechanism (a plugin's whole dependency chain is placed immediately
before it, however far the chain reaches), a hand-worked trace, why
beforeandafterbuildthe identical dependency edge under this algorithm, and its pros, cons, and corner cases.
app/gateway/plugins/plugin-ordering-priority-preserving.md(new, replacesplugin-ordering.md): the principle behindpriority_preserving("at each step, run thehighest-priority plugin whose
afterrequirements are already met"), a hand-workedstep-by-step example so readers can predict the exact order, a
priority_preserving-vs-legacycomparison on the identical configuration (the FTI-7177 displacement and the
before!=afterasymmetry, with concrete sorted results attributed to whichever algorithm producedthem), the guarantees and non-guarantees (including the non-optimal-placement case and its
fix), how request scope changes the result, and how to adopt
priority_preservingon upgrade.app/_gateway_entities/plugin.md: point the "Dynamic plugin ordering" reference callout andthe
plugin_ordering_algorithmknown-limitations bullet at both new pages instead of the onemerged page.
app/_indices/gateway.yaml: replace the single "How Gateway Works" navigation entry with oneper page.
app/_redirects: redirect the old/gateway/plugins/plugin-ordering/URL to thepriority_preservingpage..github/styles/base/Dictionary.txt: addpriority_preservingso Vale's spelling checkaccepts it outside of code spans (frontmatter descriptions, table keys) -- same convention as
the other snake_case config values already in that file.
Fixes FTI-7177
Preview Links
https://deploy-preview-5936--kongdeveloper.netlify.app/gateway/plugins/plugin-ordering-priority-preserving/
https://deploy-preview-5936--kongdeveloper.netlify.app/gateway/plugins/plugin-ordering-legacy/
https://deploy-preview-5936--kongdeveloper.netlify.app/gateway/entities/plugin/#dynamic-plugin-ordering
Checklist
descriptionentry in frontmatter.