Skip to content

test: check TES version paths on real backends - #478

Merged
uniqueg merged 8 commits into
devfrom
test/415-tes-versions
Nov 12, 2026
Merged

uniqueg merged 8 commits into
devfrom
test/415-tes-versions

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Summary

The rest of #415 apart from the Rahti checks (#424, PR #474). The jobs Integration (Funnel, TESP-API with Pulsar) and Integration (TESK) already ran proTES against real TES implementations (#422, #423). What was missing:

  • TES 1.0 and 1.1 paths on real backends. New tests/integration/versions.sh, run in both jobs for each backend, with the TES version that proTES must find:
    • a task with fields of TES 1.1 that can be dropped (inputs[].streamable, executors[].ignore_error: false, non-strict resources.backend_parameters) completes everywhere. Clients get it back as they sent it. Funnel (TES 1.1, label tes.version) gets it with the fields; TESP-API and TESK (TES 1.0) get it without them, as the script checks by reading the task from the backend itself;
    • a task with ignore_error: true on a failing executor reaches Funnel with the flag, and the next executor runs; for TESP-API and TESK, proTES rejects it with 400, naming the field.
    • tests/test_workflows.py::test_integration_versions checks that each backend in a job's config gets one such step, with the version from its label (or 1.0).
  • Finding: Funnel 0.11.14 runs the executor after one with ignore_error: true, but ends the task in EXECUTOR_ERROR, not COMPLETE. Its step sets IGNORE_ERROR_STATE=EXECUTOR_ERROR (the default is COMPLETE), so a fix in Funnel shows up as a failure. Added to the notes on TES implementations.
  • Docs: the testing section of docs/development.md describes the new checks, with the local commands. The release-notes guidance now says that the curated notes and the Upgrading page name the TES implementations that were tested (the integration jobs on the release commit, with versions and TES version, plus anything tested by hand), and those that were not. docs/tes-versions.md links to the tests. Funnel's link points to its new repository, calypr/funnel. This repo has no tests/README; docs/development.md is where the tests are documented.

Not changed:

Closes #479 (part of #415). This doesn't close it: #424 (PR #474) and #425 are still open.

Verification

  • tests/integration/versions.sh against a local Compose stack (own project, own ports): Funnel with 1.1 and TESP-API with 1.0 passed. They passed again after the review fixes (TESP-API also after the last one). With the wrong version, both failed as expected: Funnel with 1.0 (the backend has streamable), TESP-API with 1.1 (it doesn't).

  • Not run locally: TESK (k3s); the Integration (TESK) job covers it in CI.

  • pytest -W ignore::DeprecationWarning with Helm 3.22.1 and chart dependencies: 1807 passed, 11 skipped. Without the CI change, the new test fails for both jobs.

  • pre-commit run on the changed files: all hooks passed (actionlint included; no local shellcheck). mkdocs build --strict: passed.

  • CI on df0056b: Integration (TESK) passed, including the new step. Integration failed at the new TESP-API step: its first task stayed RUNNING for 3 minutes. The canceled tasks of check.sh keep running on TESP-API with Pulsar for minutes, and later tasks there wait for them; locally, versions.sh had run on a fresh stack. Fixed in d3e341a: versions.sh now runs before check.sh in that job.

  • CI on d3e341a: all jobs passed, including Integration (the four steps on Funnel and TESP-API) and Integration (TESK); Push and Publish image were skipped, as on every pull request.

  • Sourcery's review (4 threads) was addressed in 87fbbf2 and 726df20: backend_parameters is now checked at Funnel too (verified locally; ignore_error: false isn't, as Funnel's protobuf JSON omits defaults); the workflow test is stricter; the urlopen calls time out after 60 seconds. CI on 726df20: all jobs passed, including Integration and Integration (TESK).

Declined review findings

Two rounds of adversarial-reviewer (no high or medium findings) and quality-reviewer. Fixed:

  • null counts as absent on TES 1.0 backends;
  • the TES 1.0 check also requires the input path and one executor, so a backend that ignores the view FULL can't pass it;
  • the test checks that the Funnel step keeps IGNORE_ERROR_STATE;
  • the testing docs are restructured, with no dangling reference, and comments are rewrapped;
  • the task helper is simpler.

Declined:

  • Rewrapping lines that were already over 80 characters before this PR (in the TESK paragraph and the CI comment).

  • Moving the helpers shared with check.sh into a sourced tests/integration/lib.sh: check.sh is being changed in test: save the Rahti checks in the test suites #474. The header of versions.sh now says to keep the two scripts in sync, and a follow-up can merge them once test: save the Rahti checks in the test suites #474 has landed.

  • Proving on the backend that proTES dropped the TES 1.1 fields: a TES 1.0 backend may ignore fields it doesn't know. The script checks that the backend serves none of them, and the comment points to the adapter's unit tests (tests/ga4gh/tes/test_versions.py), which check the dropping. The ignore_error: true task tells the two version paths apart (200 against 400).

  • Splitting the release-notes guidance into its own PR: it is a bullet of test: run against real TES implementations #415 ("say in the release notes which backends were tested") and is described in the summary. It matches the existing paragraph **Tested TES implementations:** in docs/upgrading.md.

  • A heading anchor for the link to the testing docs: docs/development.md has no "Testing" heading; the link matches the existing one in docs/configuration.md.

  • The Funnel link: the repository moved to calypr/funnel (GitHub redirects the old URL); this is in the commit message.

Open questions

None.

🤖 Generated with Claude Code

https://claude.ai/code/session_011FSoqMpmDCfbACLj3uy6xV

Summary by Sourcery

Verify proTES TES 1.0 and 1.1 compatibility against real backends and document the resulting integration coverage.

New Features:

  • Add integration coverage for TES 1.0 and 1.1 version paths against Funnel, TESP-API, and TESK backends.
  • Validate TES 1.1 field handling and ignore_error behavior through real backend task submissions.

Enhancements:

  • Add workflow validation ensuring every configured integration backend runs the version checks with the expected TES version.
  • Document the real-backend TES version checks, local execution commands, Funnel behavior, and release-note guidance for tested implementations.
  • Update Funnel's repository link and record its observed ignore_error terminal-state behavior.

CI:

  • Run TES version-path checks in the Integration and Integration (TESK) CI jobs before the existing backend checks.

Documentation:

  • Document TES version integration testing and tested-backend reporting requirements.

Tests:

  • Add a shell integration test covering TES 1.0 field dropping, TES 1.1 field preservation, and ignore_error execution behavior.
  • Add workflow tests that verify version-check coverage and expected backend versions for both integration jobs.

uniqueg and others added 4 commits November 12, 2026 06:01
Adds tests/integration/versions.sh, run by the jobs Integration and
Integration (TESK) for each backend: a task with fields of TES 1.1
that can be dropped reaches Funnel (TES 1.1) with them, and TESP-API
and TESK (TES 1.0) without them; a task with ignore_error: true runs
on Funnel and is rejected for the TES 1.0 backends. A test checks
that the version of each step matches the job's config.

Funnel 0.11.14 runs the executor after the failing one, but ends the
task in EXECUTOR_ERROR, so its step sets IGNORE_ERROR_STATE.

Refs #415

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011FSoqMpmDCfbACLj3uy6xV
Describes the checks of the TES version paths in the testing section,
adds Funnel's behaviour with ignore_error to the notes on TES
implementations (and its new repository), and says in the release
notes guidance that the notes and the Upgrading page name the TES
implementations that were tested, in CI and by hand.

Refs #415

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011FSoqMpmDCfbACLj3uy6xV
Treats null fields as absent on TES 1.0 backends (as Java backends may
serve unset fields so), checks that the Funnel step keeps
IGNORE_ERROR_STATE, simplifies the task helper, and restructures the
testing docs into a paragraph per script.

Refs #415

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011FSoqMpmDCfbACLj3uy6xV
The check that a TES 1.0 backend serves no fields of TES 1.1 passed
on a task without inputs or executors, e.g., if a backend ignored
view FULL. It now also requires the input path and one executor.

Refs #415

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011FSoqMpmDCfbACLj3uy6xV
@sourcery-ai

sourcery-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Add the real-backend TES-version check that verifies task fields, execution behavior, and backend-served task representations.

  • tests/integration/versions.sh L1-159

Configuration

Run the version checks for each configured backend in the Integration and Integration (TESK) jobs, before checks that can leave tasks running on TESP-API.

  • .github/workflows/ci.yml L414-416, L446-460, L503-506

Documentation

Document the version-path checks, backend behavior, local commands, and guidance for recording tested implementations in release notes.

  • docs/configuration.md L317-321
  • docs/development.md L76-101, L109-112, L620-630 (+2 small edits)
  • docs/tes-versions.md L7-8

Tests

Assert that every configured backend has a required, non-skippable version-check step with the expected TES version and Funnel state override.

  • tests/test_workflows.py L123-168

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

@read-the-docs-community

read-the-docs-community Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 proTES | 🛠️ Build #35831943 | 📁 Comparing 58c6699 against latest (f2abed1)

  🔍 Preview build  

4 files changed
± configuration/index.html
± deployment/index.html
± development/index.html
± tes-versions/index.html

@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8a2bdc4) to head (58c6699).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #478   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           31        31           
  Lines         3038      3038           
=========================================
  Hits          3038      3038           

☔ 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.

In CI, the task of versions.sh on TESP-API stayed RUNNING for three
minutes: the canceled tasks of check.sh keep running there with
Pulsar for minutes, and later tasks wait for them. The job Integration
now runs versions.sh first on each backend.

Refs #415

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011FSoqMpmDCfbACLj3uy6xV
@uniqueg
uniqueg marked this pull request as ready for review November 12, 2026 06:05

@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 4 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="tests/integration/versions.sh" line_range="133" />
<code_context>
+    and .executors[0].ignore_error == null
+    and .resources.backend_parameters == null'
+else
+  check_backend "${id}" '.inputs[0].streamable == true'
+fi
+
</code_context>
<issue_to_address>
**TES 1.1 field regressions pass**

When funnel or proTES drops `executors[0].ignore_error: false` or `resources.backend_parameters` while retaining `inputs[].streamable`, `check_backend` checks only `inputs[0].streamable`, so the TES 1.1 integration check passes and CI reports the relay path as healthy despite either dropped field.

Extend the TES 1.1 backend check to assert `executors[0].ignore_error` and `resources.backend_parameters` as well as `inputs[0].streamable`.
</issue_to_address>

### Comment 2
<location path="tests/test_workflows.py" line_range="158" />
<code_context>
+            states[args[2]] = step.get("env", {}).get("IGNORE_ERROR_STATE")
+    assert checked == expected, f"versions.sh steps of {job_id}: {checked}"
+    # Funnel 0.11.14 ends tasks with `ignore_error: true` in `EXECUTOR_ERROR`
+    assert states.get("http://funnel:8000", "EXECUTOR_ERROR") == "EXECUTOR_ERROR"
+
+
</code_context>
<issue_to_address>
**Missing workflow setting passes**

When the Funnel version-check step omits `IGNORE_ERROR_STATE`, `states.get("http://funnel:8000", "EXECUTOR_ERROR")` supplies the expected value when the setting is absent, so the assertion passes and the workflow test reports success.

Remove the default from `states.get` so the assertion fails when `IGNORE_ERROR_STATE` is absent.
</issue_to_address>

### Comment 3
<location path="tests/test_workflows.py" line_range="150-155" />
<code_context>
+    }
+    checked = {}
+    states = {}
+    for step in job["steps"]:
+        args = shlex.split(step.get("run", ""))
+        if args[:1] == ["tests/integration/versions.sh"]:
+            # Arguments: API, backend URL, backend API path, TES version
+            checked[args[2]] = args[4]
+            states[args[2]] = step.get("env", {}).get("IGNORE_ERROR_STATE")
+    assert checked == expected, f"versions.sh steps of {job_id}: {checked}"
+    # Funnel 0.11.14 ends tasks with `ignore_error: true` in `EXECUTOR_ERROR`
</code_context>
<issue_to_address>
**Skipped version checks still pass**

When a `versions.sh` step is guarded by an always-false condition or has `continue-on-error: true`, `test_integration_versions` only collects run arguments and checks the backend/version mapping and Funnel's environment; it never checks step conditions or error handling, so CI can skip these checks or tolerate their failures while this test passes.

Assert that every matching step is not conditionally skipped and does not tolerate failure.
</issue_to_address>

### Comment 4
<location path="tests/integration/versions.sh" line_range="38" />
<code_context>
+auth="$(docker compose exec -T fake-tes python -c \
+  "import json, urllib.request; \
+  print(json.load(urllib.request.urlopen( \
+  'http://localhost:8080/oidc/token?sub=alice'))['access_token'])")"
+
+# Request a path of proTES, with an optional JSON body; check the status and
</code_context>
<issue_to_address>
**Stalled requests block the script**

When the identity-provider or backend accepts a connection but does not complete its response, `urllib.request.urlopen` in both requests has no timeout, so the script blocks without reaching a bounded test failure and CI waits until the job-level timeout.

Pass a finite timeout to both `urllib.request.urlopen` calls.

Also at `tests/integration/versions.sh:96`.
</issue_to_address>

Sourcery assessment

Approval pending. 4 findings to address first.

Blocking findings: tests/integration/versions.sh:133, tests/test_workflows.py:158, tests/test_workflows.py:155, tests/integration/versions.sh:38


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

Comment thread tests/integration/versions.sh Resolved
Comment thread tests/test_workflows.py Resolved
Comment thread tests/test_workflows.py Resolved
Comment thread tests/integration/versions.sh Resolved
uniqueg and others added 3 commits November 12, 2026 07:26
Checks backend_parameters on the TES 1.1 backend too, bounds the
requests to the identity provider and the backend to 60 seconds, and
makes the workflow test fail if a version check can be skipped or
tolerates failure, or if the setting of IGNORE_ERROR_STATE changes.

Refs #415

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011FSoqMpmDCfbACLj3uy6xV
@sourcery-ai

sourcery-ai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Linked issues

Checked at commit 58c6699

#479 test: check the TES version paths on real backends · 3 of 3 met

# Requirement Status Notes
1 Per backend, check that fields of TES 1.1 reach TES 1.1 instances and not TES 1.0 ones. ✅ Met versions.sh checks the fields served by each backend, and test_integration_versions verifies that every configured backend has a version-check step using its label or the TES 1.0 default.
2 Check that tasks TES 1.0 can't run, such as one with ignore_error: true, are rejected for TES 1.0 backends. ✅ Met versions.sh expects a 400 mentioning ignore_error for TES 1.0 and checks that the task runs on the TES 1.1 path.
3 The release-notes guidance says which backends were tested. ✅ Met docs/development.md directs release notes to name tested implementations and versions, and to identify implementations or deployments that were not tested.

@uniqueg
uniqueg merged commit d91cd22 into dev Nov 12, 2026
36 checks passed
@uniqueg
uniqueg deleted the test/415-tes-versions branch November 12, 2026 06:57
uniqueg added a commit that referenced this pull request Nov 25, 2026
- The Maintenance bullet on the integration tests names issue #479
  (closed by #478), not its parent #415.
- New Maintenance bullet for the release dry run (#512, #513), which
  ships with this release once #513 is merged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
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.

test: check the TES version paths on real backends

1 participant