Repository navigation
feat: accept the task fields of TES 1.1 - #133
Conversation
Reviewer's GuideData structuresAdd TES 1.1 fields to the task models, including validation that rejects unsupported executor behavior and output patterns the filer cannot handle.
APIReport TES 1.1.0 in service information to advertise the API version implemented by TESK.
Uses of the APIVerify that output path prefixes reach the taskmaster payload so the filer can collect wildcard matches under the requested URL.
DocumentationDocument TES 1.1 field behavior, validation limits, and the service-info version.
TestsAdd model and API tests for TES 1.1 field serialization, equality, and validation, plus service-version and accepted/rejected submission coverage.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #133 +/- ##
==========================================
+ Coverage 68.48% 70.49% +2.00%
==========================================
Files 67 67
Lines 2780 2827 +47
Branches 300 312 +12
==========================================
+ Hits 1904 1993 +89
+ Misses 730 690 -40
+ Partials 146 144 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/main/resources/service-info.yaml" line_range="6" />
<code_context>
group: org.ga4gh
artifact: TES
- version: 1.0
+ version: 1.1.0
description: GA4GH TES Server implementation for Kubernetes
organization:
</code_context>
<issue_to_address>
**Wildcard outputs are misplaced**
When the service uses taskmaster or filer images without `path_prefix` support and a task submits an output with `path_prefix`, the API accepts and forwards `path_prefix`, but those images do not apply the requested destination mapping, so wildcard outputs are uploaded to the wrong paths or fail despite service info claiming TES 1.1.0.
Ship taskmaster and filer images that implement `path_prefix` before advertising TES 1.1.0 support.
Also at `docs/api.md:68`, `src/main/java/uk/ac/ebi/tsc/tesk/tes/model/TesOutput.java:32-33`.
</issue_to_address>
### Comment 2
<location path="src/main/resources/service-info.yaml" line_range="6" />
<code_context>
group: org.ga4gh
artifact: TES
- version: 1.0
+ version: 1.1.0
description: GA4GH TES Server implementation for Kubernetes
organization:
</code_context>
<issue_to_address>
**Chart reports the old TES version**
When a deployment uses the Helm chart’s separate service-info YAML, `ServiceInfoService` loads the YAML configured by the Helm chart rather than this classpath file, so chart deployments that keep their own `service-info.yaml` continue reporting version 1.0 instead of the claimed 1.1.0.
Update the chart’s service-info YAML to report 1.1.0, or avoid claiming the version bump until the chart is updated.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 2 findings to address first, and if the path-prefix handling is wrong, task outputs may be uploaded under incorrect object keys at the supplied URL. Reverting stops the new handling but does not remove objects already written; the impact is bounded to affected task outputs and can generally be repaired by removing or re-uploading them.
Blocking findings: src/main/resources/service-info.yaml:6, src/main/resources/service-info.yaml:6
e9befaa to
c074ea4
Compare
uniqueg
left a comment
There was a problem hiding this comment.
Thanks, this looks good: the fields round-trip through the stored task JSON, and the refusals for ignore_error: true and strict backend parameters are clear. Tests and docs are there, CI is green.
On your open question: I'd merge this together with tesk-core#134, after 1.2.0, and let the 1.1.0 in service info ship in the release where the chart's default taskmaster and filer images include #134. The chart's own service-info.yaml needs the same bump (TESK repo), otherwise chart deployments keep reporting 1.0.
Two small optional points inline. Could you also reply to the two Sourcery threads, so they can be resolved?
|
Thanks for the approval, @uniqueg.
Both Sourcery threads have replies. |
- outputs[].path_prefix is passed to the taskmaster, whose filer uploads the matches of outputs with wildcards (tesk-core); it must be absolute. - inputs[].streamable is accepted and ignored, as TES allows. - executors[].ignore_error is accepted when false; true is refused, as TESK stops at the first executor that fails. - resources.backend_parameters are refused when backend_parameters_strict is true, as TES asks; TESK uses none. Service info reports TES 1.1.0.
Outputs with wildcards are refused with 400 Bad Request if path_prefix is not the part of path before its first wildcard or a directory above it (the filer would fail the output after the executors ran), or if path has wildcards in its first component (/*.txt), which would need a mount at /.
381ad58 to
3536789
Compare
Summary
Part of elixir-cloud-aai/TESK#276. TESK API refused every TES 1.1 field with
400 Bad Request(fail_on_unknown_properties), so clients that send wildcard outputs couldn't use TESK. The filer side is elixir-cloud-aai/tesk-core#134.outputs[].path_prefixis accepted (validated as an absolute path) and passed to the taskmaster, whose filer uploads the matches of a pattern belowurl. Outputs without it are unchanged.inputs[].streamableis accepted and ignored, as TES allows: inputs are always downloaded first.executors[].ignore_erroris accepted whenfalse.trueis refused with a clear message rather than run differently than asked: TESK stops at the first executor that fails, and the task state comes from all executor jobs.resources.backend_parameterswithbackend_parameters_strict: trueis refused, as TES asks of backends that don't support the parameters. Withoutstrictthey are ignored, as before.service-info.yaml) reportstype.version: 1.1.0.docs/api.md.Verification
Locally, with JDK 8 (
eclipse-temurin:8-jdk, as in CI), rebased ondevat d432100:./mvnw spotless:check checkstyle:check: pass./mvnw clean verify: 7404 unit tests and 83 integration tests, 0 failures. New tests:createTask_valid_tes11Fields: all four fields;createTask_invalid_strictBackendParameters;ignore_error_true.jsonandrelative_path_prefix.jsonin the invalid-task lists;fromTesTaskToK8sConfigMap_passesPathPrefix:path_prefixreaches the taskmaster's input.mkdocs build --strict: passOn a cluster
This image, with taskmaster and filer images from tesk-core#134, installed with the
TESKdevchart (Talos, Kubernetes 1.33). nf-core/sarek 3.8.1 (test, Strelka) ran with every task sent to TESK through a TES gateway:Open questions
service-info.yamlalso still says1.0.Summary by Sourcery
Support TES 1.1 task fields while rejecting requests whose semantics TESK cannot provide.
New Features:
Enhancements:
Documentation:
Tests: