Repository navigation
test: check TES version paths on real backends - #478
Conversation
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
Reviewer's GuideImplementationAdd the real-backend TES-version check that verifies task fields, execution behavior, and backend-served task representations.
ConfigurationRun the version checks for each configured backend in the Integration and Integration (TESK) jobs, before checks that can leave tasks running on TESP-API.
DocumentationDocument the version-path checks, backend behavior, local commands, and guidance for recording tested implementations in release notes.
TestsAssert that every configured backend has a required, non-skippable version-check step with the expected TES version and Funnel state override.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Documentation build overview
4 files changed± configuration/index.html± deployment/index.html± development/index.html± tes-versions/index.html |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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
There was a problem hiding this comment.
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
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
Refs #415 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqMpmDCfbACLj3uy6xV
Linked issuesChecked at commit 58c6699 #479 test: check the TES version paths on real backends · 3 of 3 met
|
- 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
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:
tests/integration/versions.sh, run in both jobs for each backend, with the TES version that proTES must find:inputs[].streamable,executors[].ignore_error: false, non-strictresources.backend_parameters) completes everywhere. Clients get it back as they sent it. Funnel (TES 1.1, labeltes.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;ignore_error: trueon a failing executor reaches Funnel with the flag, and the next executor runs; for TESP-API and TESK, proTES rejects it with400, naming the field.tests/test_workflows.py::test_integration_versionschecks that each backend in a job's config gets one such step, with the version from its label (or 1.0).ignore_error: true, but ends the task inEXECUTOR_ERROR, notCOMPLETE. Its step setsIGNORE_ERROR_STATE=EXECUTOR_ERROR(the default isCOMPLETE), so a fix in Funnel shows up as a failure. Added to the notes on TES implementations.docs/development.mddescribes 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.mdlinks to the tests. Funnel's link points to its new repository, calypr/funnel. This repo has notests/README;docs/development.mdis where the tests are documented.Not changed:
CI passed: ci: require the job Integration in the gate #425 does that once they have proven reliable. The jobs stay fork-safe: no secrets,persist-credentials: false, no pushes.tests/integration/check.shstays as it is, because test: save the Rahti checks in the test suites #474 changes it;versions.shhas its own copies of the helpers.Closes #479 (part of #415). This doesn't close it: #424 (PR #474) and #425 are still open.
Verification
tests/integration/versions.shagainst a local Compose stack (own project, own ports): Funnel with1.1and TESP-API with1.0passed. They passed again after the review fixes (TESP-API also after the last one). With the wrong version, both failed as expected: Funnel with1.0(the backend hasstreamable), TESP-API with1.1(it doesn't).Not run locally: TESK (k3s); the Integration (TESK) job covers it in CI.
pytest -W ignore::DeprecationWarningwith Helm 3.22.1 and chart dependencies: 1807 passed, 11 skipped. Without the CI change, the new test fails for both jobs.pre-commit runon 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
RUNNINGfor 3 minutes. The canceled tasks ofcheck.shkeep running on TESP-API with Pulsar for minutes, and later tasks there wait for them; locally,versions.shhad run on a fresh stack. Fixed in d3e341a:versions.shnow runs beforecheck.shin 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_parametersis now checked at Funnel too (verified locally;ignore_error: falseisn't, as Funnel's protobuf JSON omits defaults); the workflow test is stricter; theurlopencalls 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) andquality-reviewer. Fixed:nullcounts as absent on TES 1.0 backends;FULLcan't pass it;IGNORE_ERROR_STATE;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.shinto a sourcedtests/integration/lib.sh:check.shis being changed in test: save the Rahti checks in the test suites #474. The header ofversions.shnow 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. Theignore_error: truetask tells the two version paths apart (200against400).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:**indocs/upgrading.md.A heading anchor for the link to the testing docs:
docs/development.mdhas no "Testing" heading; the link matches the existing one indocs/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:
ignore_errorbehavior through real backend task submissions.Enhancements:
ignore_errorterminal-state behavior.CI:
Documentation:
Tests:
ignore_errorexecution behavior.