feat(epp): add error return to PreRequest plugin interface - #2215
Open
dmitripikus wants to merge 1 commit into
Open
feat(epp): add error return to PreRequest plugin interface#2215dmitripikus wants to merge 1 commit into
dmitripikus wants to merge 1 commit into
Conversation
Groundwork for issue llm-d#1686 (conditional-decode routing). PreRequest plugins need a way to signal failure to the director. The runner now invokes every registered plugin regardless of individual failures and returns their aggregated errors via errors.Join, so a caller sees all failures at once rather than only the first. Every existing implementation returns nil today; behavior is unchanged. Signed-off-by: Dmitri Pikus <DPIKUS@il.ibm.com>
dmitripikus
requested review from
a team,
LukeAVanDrie,
bongwoobak,
kaushikmitr,
liu-cong,
shmuelk and
vMaroon
as code owners
July 28, 2026 13:05
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.
What type of PR is this?
/kind feature
What this PR does / why we need it:
Adds an
errorreturn to thePreRequestplugin interface so plugins can signal failure to the director. The director's runner now invokes every registeredPreRequestplugin regardless of individual failures and returns their aggregated errors viaerrors.Join, so a caller sees all failures at once rather than only the first.This is groundwork for #1686 (conditional-decode routing), where a new plugin at the
PreRequestextension point needs to be able to fail a request. Per @elevran's comment on the issue, this preliminary PR lands the interface change on its own so the conditional-decode work can build on it.Every existing implementation of
PreRequestreturnsniltoday; behavior is unchanged. Individual plugins that currently log-and-swallow errors (e.g.preciseprefixcachecallingindex.Add) are left as-is here — surfacing those errors is a follow-up.Note on aggregation strategy: this diverges from the first-error-wins pattern used by
runAdmissionPluginsandrunRequestHeaderProcessors. EveryPreRequestplugin runs its side effects even if a peer plugin has already failed, and the joined error covers all of them.Which issue(s) this PR fixes:
Issue #2216
Release note:
The
PreRequestplugin interface now returns anerror. Existing built-in plugins returnniland are unaffected; out-of-tree plugin authors implementingPreRequestmust update their method signatures.