Because the order is built by that one repeated step, you can always work it out by hand. Take the
customer scenario that motivated this feature:
|
Plugin
|
Priority
|
Ordering rule
|
pre-function
|
1000000
|
after: [opentelemetry]
|
request-callout
|
812
|
(none)
|
opentelemetry
|
14
|
(none)
|
By static priority alone the order would be pre-function → request-callout → opentelemetry. You’ve
asked for one change: run pre-function after opentelemetry. Here’s how priority_preserving
builds the result:
- Ready:
request-callout (812), opentelemetry (14). pre-function is not ready — it must
wait for opentelemetry. → Run the highest-priority ready plugin: request-callout.
- Ready:
opentelemetry (14). → Run opentelemetry. This satisfies pre-function’s
requirement.
- Ready:
pre-function. → Run pre-function.
Result: request-callout → opentelemetry → pre-function.
Notice what did not happen: request-callout, which you never configured, was not itself
repositioned by any rule — it rose one slot only because pre-function dropped past it on the way
to its anchor. You moved pre-function, and only pre-function carried an ordering rule.
Compare legacy on the identical configuration: it visits pre-function first (highest
priority), recursively places its dependency opentelemetry ahead of it, then places
pre-function, and only then reaches request-callout — giving opentelemetry → pre-function →
request-callout. Two plugins moved there, opentelemetry and request-callout, even though
only pre-function carried a rule:
|
|
priority_preserving
|
legacy
|
|
Result
|
request-callout, opentelemetry, pre-function
|
opentelemetry, pre-function, request-callout
|
|
What moved
|
only pre-function (as configured)
|
opentelemetry jumped to the front and request-callout was pushed to the end — neither was configured
|
That surprise — an unrelated plugin changing position — is exactly what priority_preserving
removes: it never repositions a plugin except the one named in a rule, and any plugin a mover
passes on the way to its anchor only shifts by as much as that one mover’s move requires.