Skip to content

fix(plugins): reject backend choices without match #808

Closed

Description

@uniqueg

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

  • allow with only unknown items: 400, invalid-backends, message without client values; no plugin of the forward phase runs.
  • allow with a known item that routing dropped, or that fails: unchanged.
  • Tests in tests/plugins/ for both; docs: docs/plugins.md and docs/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

  1. self-assigned this
    on Nov 20, 2026
  2. added
    priority: low
    status: in progress
    type: bug
    workload: hours
    flag: nice to have
    on Nov 20, 2026
  3. added this to the v0.23.0 milestone on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

flag: nice to havepriority: lowstatus: in progresstype: bugworkload: hours

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions