Repository navigation
Description
Problem
proTES serves GA4GH TES 1.0.0 (pro_tes/api/9e9c5aa.task_execution_service.openapi.yaml, set in pro_tes/config.yaml). The current version is TES 1.1.0. It adds to the API, among other things:
backend_parametersandbackend_parameters_strictin task resources;ignore_erroron executors;streamableon inputs;- the
PREEMPTEDtask state; tag_key/tag_valuefilters for listing tasks;- service-info fields for storage and supported backend parameters.
Clients written for 1.1 can't use these features through proTES, and the fields may be dropped when tasks are relayed (see also the backend_parameters follow-up from #208). pro_tes/api/ also still contains three older, unused TES specs (20181113.0ad42aa…, 20190903.d55bf88…, including a "modified" copy).
Expected
- proTES serves the official TES 1.1.0 spec, vendored with its source and commit, as in Cloud Registry. Any proTES-specific additions stay in
additions.openapi.yaml. - Per-backend translation. As a gateway, proTES routes tasks to backends that may still implement TES 1.0, so it must adapt each task to the version of the backend it is sent to:
-
Determine each backend's TES version, e.g. from its
GET /service-info(type.version), cached, or from configuration. -
For 1.0 backends, rewrite the outgoing task: drop or map fields that 1.0 doesn't know. Take care with fields whose removal changes what the task does:
- With
backend_parameters_strict: true, a 1.0 backend can't honour the parameters, so treat it as not eligible. - Without
ignore_error, a failing executor stops the task, unlike what the client asked for.
Prefer routing such tasks only to 1.1 backends over silently changing them.
- With
-
Map responses from 1.0 backends to 1.1, so clients always see 1.1, e.g. states and service info.
-
The middleware that picks a backend takes version compatibility into account.
-
- Extensible design. Translation must not be a one-off 1.0/1.1 special case: future TES versions (1.2, 2.0) will need the same.
- proTES stores tasks internally in one canonical model, the newest supported version.
- Version adapters convert between adjacent versions in both directions: tasks down to a backend's version, responses up to the client's version.
- Adapters can be chained, e.g. 2.0 → 1.1 → 1.0, so a new version only needs one new adapter.
- Each adapter declares which fields it can't express in the older version, and the backend selection uses that.
- Adapters are registered, not hard-coded in the controllers or the relay, and each comes with its own tests.
- Supporting a new TES version means adding its spec and one adapter, as described in the docs.
- New fields are stored and relayed unchanged to 1.1 backends. List filters and service info follow the spec.
- The unused old specs are removed.
- Tests cover the new fields, the translation for 1.0 backends (incl. tasks only 1.1 backends can run) and the new state. The docs list the supported TES versions and what happens to tasks routed to 1.0 backends. The release notes mention the change.
Check the order against #214 (FOCA and Python 3.13) and #215 (task ownership), which touch the same controllers, and #217/#218 (middlewares), which touch backend selection.
Activity