Skip to content

feat: accept the task fields of TES 1.1 - #133

Merged
uniqueg merged 3 commits into
devfrom
feat/tes-1.1-outputs
Nov 10, 2026
Merged

uniqueg merged 3 commits into
devfrom
feat/tes-1.1-outputs

Conversation

@anuragxxd

@anuragxxd anuragxxd commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

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_prefix is accepted (validated as an absolute path) and passed to the taskmaster, whose filer uploads the matches of a pattern below url. Outputs without it are unchanged.
  • inputs[].streamable is accepted and ignored, as TES allows: inputs are always downloaded first.
  • executors[].ignore_error is accepted when false. true is 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_parameters with backend_parameters_strict: true is refused, as TES asks of backends that don't support the parameters. Without strict they are ignored, as before.
  • Service info (service-info.yaml) reports type.version: 1.1.0.
  • Docs: "TES 1.1 fields" in docs/api.md.

Verification

Locally, with JDK 8 (eclipse-temurin:8-jdk, as in CI), rebased on dev at 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.json and relative_path_prefix.json in the invalid-task lists;
    • fromTesTaskToK8sConfigMap_passesPathPrefix: path_prefix reaches the taskmaster's input.
  • mkdocs build --strict: pass

On a cluster

This image, with taskmaster and filer images from tesk-core#134, installed with the TESK dev chart (Talos, Kubernetes 1.33). nf-core/sarek 3.8.1 (test, Strelka) ran with every task sent to TESK through a TES gateway:

  • 23 of 23 tasks COMPLETE;
  • the results match an all-local run: the same 170 files, and identical VCF records.

Open questions

  • Version. Should the service-info bump to 1.1.0 wait for a release in which tesk-core#134 is in the chart's default filer? The chart's own service-info.yaml also still says 1.0.
  • Where this lands. 1.2.0 is close; I'm fine with this going into the release after it.

Summary by Sourcery

Support TES 1.1 task fields while rejecting requests whose semantics TESK cannot provide.

New Features:

  • Accept TES 1.1 task fields for output path prefixes, streamable inputs, executor error handling, and backend parameters with TESK-compatible validation and behavior.

Enhancements:

  • Expose TES 1.1 support and output path-prefix behavior in the API documentation.

Documentation:

  • Update API documentation and service metadata to identify TES 1.1.0 support.

Tests:

  • Add coverage for TES 1.1 field acceptance, validation failures, service version reporting, and propagation of output path prefixes.

@anuragxxd
anuragxxd requested a review from uniqueg as a code owner November 9, 2026 05:56
@sourcery-ai

sourcery-ai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Data structures

Add TES 1.1 fields to the task models, including validation that rejects unsupported executor behavior and output patterns the filer cannot handle.

  • src/main/java/uk/ac/ebi/tsc/tesk/tes/model/TesExecutor.java L250-278 (+5 small edits)
  • src/main/java/uk/ac/ebi/tsc/tesk/tes/model/TesInput.java L124-142 (+4 small edits)
  • src/main/java/uk/ac/ebi/tsc/tesk/tes/model/TesOutput.java L121-205 (+5 small edits)
  • src/main/java/uk/ac/ebi/tsc/tesk/tes/model/TesResources.java L5, L14, L149-161

API

Report TES 1.1.0 in service information to advertise the API version implemented by TESK.

  • src/main/resources/service-info.yaml L6

Uses of the API

Verify that output path prefixes reach the taskmaster payload so the filer can collect wildcard matches under the requested URL.

  • src/test/java/uk/ac/ebi/tsc/tesk/k8s/convert/TesKubernetesConverterTest.java L445-473

Documentation

Document TES 1.1 field behavior, validation limits, and the service-info version.

  • docs/api.md L4-5, L55-83, L202-203

Tests

Add model and API tests for TES 1.1 field serialization, equality, and validation, plus service-version and accepted/rejected submission coverage.

  • src/test/java/uk/ac/ebi/tsc/tesk/tes/api/ServiceInfoApiControllerTest.java L38, L45
  • src/test/java/uk/ac/ebi/tsc/tesk/tes/api/TasksApiControllerTest.java L210, L256-263, L448-484
  • src/test/java/uk/ac/ebi/tsc/tesk/tes/model/Tes11FieldsTest.java L1-147
  • src/test/resources/invalid_tasks/executors/ignore_error_true.json L1-5
  • src/test/resources/invalid_tasks/outputs/path_prefix_below_pattern.json L1-4
  • src/test/resources/invalid_tasks/outputs/relative_path_prefix.json L1-8
  • src/test/resources/invalid_tasks/outputs/wildcard_in_first_component.json L1-4
  • src/test/resources/invalid_tasks/resources/backend_parameters_strict.json L1-6
  • src/test/resources/valid_tasks/tes_1_1_fields.json L1-12

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.49%. Comparing base (2921fe9) to head (3536789).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread src/main/resources/service-info.yaml Resolved
Comment thread src/main/resources/service-info.yaml Resolved
@anuragxxd
anuragxxd force-pushed the feat/tes-1.1-outputs branch from e9befaa to c074ea4 Compare November 10, 2026 09:59

@uniqueg uniqueg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@anuragxxd

Copy link
Copy Markdown
Member Author

Thanks for the approval, @uniqueg.

  • path_prefix validation (your optional point) is in 381ad58, together with refusing root-level patterns such as /*.txt, which your tesk-core#134 review asked for. Both now get a 400 at submission instead of failing after the executors run. 11,927 unit and 83 integration tests pass under JDK 8, every changed line is covered, and the docs build strictly.
  • The Java names in validation paths: left as they are, for consistency with the existing fields.
  • Sequencing: agreed to merge this together with tesk-core#134 after 1.2.0. I'll open the TESK chart PR (service-info.yaml type version 1.1.0, plus the default taskmaster and filer tags) once a tesk-core release includes fix: match group prefix and suffix literally #134.

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 /.
@anuragxxd
anuragxxd force-pushed the feat/tes-1.1-outputs branch from 381ad58 to 3536789 Compare November 10, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants