Repository navigation
Description
Problem
A client that pins a request with gateway.backends {"type": "allow", ...} to backends that aren't candidates at all (unknown identifier, a typo, a URL in another form) gets the same answer as when every backend is down: the app's "no backend available" (proTES: 503 No TES instance accepted the task). The discarded items are only in the provenance, and the request isn't stored, so the client can't learn why. It may retry forever against what looks like an outage.
Proposal
In PipelineRun.route() (or apply_backend_selection()), if the selection is allow and none of its items matches a candidate of the request before routing (candidates_in), raise InvalidSelection (slug invalid-backends, 400), without echoing the client's items (cf. #743). Keep today's behaviour when items match candidates that routing or eligibility removed, or that then fail: those stay "no backend available", as they may be transient. order and forbid are unchanged: they never empty the list on their own.
This is the "an empty result gives a 4xx with reasons" rule of #528's client interface, for the current tag, without changing its shape.
Acceptance criteria
allowwith only unknown items:400,invalid-backends, message without client values; no plugin of theforwardphase runs.allowwith a known item that routing dropped, or that fails: unchanged.- Tests in
tests/plugins/for both; docs:docs/plugins.mdanddocs/configuration/plugins.md(Per-request choices), changelog/release notes entry. - proTES picks it up with its next FOCA bump, which updates the pinning how-to (protes issue B).
Activity