Skip to content

test: run against Funnel and TESP-API in CI - #426

Merged
uniqueg merged 1 commit into
devfrom
test/real-tes-backends
Nov 4, 2026
Merged

uniqueg merged 1 commit into
devfrom
test/real-tes-backends

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #422 (part of #415, which stays open for #423, #424 and #425).

Adds the job integration ("Integration") to ci.yml. proTES in Docker Compose relays tasks to real TES implementations, pinned by digest: Funnel 0.11.14 (official image, plus the Docker CLI, which it lacks) and TESP-API 0.2.0 (published image at cerit.io) with Pulsar 0.14.16. tests/integration/check.sh runs, against each backend: a task that finishes (with an input), one that fails, one canceled while it runs, one canceled right away; final states, logs in FULL and BASIC, and the state that the backend itself reports.

Not needed by the gate yet (NOT_IN_GATE in tests/test_workflows.py, see #425); skipped with if: on edits of pull requests. No secrets; the job has only contents: read. Executors run through the runner's Docker socket.

Light lane: only tests/ and a CI job, without secrets, permissions or the release workflow; nothing in pro_tes/. I reviewed the diff myself.

What real backends do differently from the fake

  • TESP-API 0.2.0 with Pulsar 0.15 or later serves empty stdout and stderr. Seen with 0.15.6, 0.15.16 and 0.16.0; 0.14.16 works. TESP's own Dockerfile installs Pulsar unpinned, so it gets 0.16.0 today. The job pins 0.14.16 so that logs are tested.
  • TESP-API reports a canceled task as CANCELED, but its container keeps running (seen: sleep 600 still up 9 minutes later). Funnel removes it.
  • TESP-API writes one executor log for all executors, with stdout concatenated, and stderr holds shell traces, host paths and pull progress. Funnel writes one log per executor.
  • TESP-API reports TES 1.0.0, so proTES sends it no 1.1 fields: ignore_error gives 400.
  • A file:// output on TESP gives the client 503 No backend accepted the request. TESP's model doesn't allow that scheme (read in its source; its response wasn't observed).
  • Funnel reports type.version: "", not its own version as docs/configuration.md says; the label tes.version stays needed.

Verification

Local (before the denial below), with Docker Compose: check.sh passed against Funnel and against TESP-API with Pulsar 0.14.16. Pre-commit on the changed files and tests/test_workflows.py (67 passed).

Not run locally: the final check.sh with inputs, the pinned stage image and port 8080, because running a third-party image locally was then denied by the permission classifier. CI covers these.

CI: run 41833031056 passed, with Integration green on both backends, on the first push. Runs for edits of the pull request show Integration as skipped, on purpose.

Unrelated fixes

None.

Declined review findings

None (light lane).

Open questions

None.

🤖 Generated with Claude Code

Summary by Sourcery

Validate proTES interoperability with real TES backends through a non-blocking CI integration suite.

New Features:

  • Add a CI integration job that runs proTES against pinned Funnel and TESP-API backends with Pulsar.
  • Add integration coverage for successful, failed, and canceled tasks, including task states and log views from both proTES and the underlying backends.

Enhancements:

  • Configure Docker Compose environments and backend routing for real TES implementations.
  • Keep the integration job outside the required CI gate and skip it for pull-request edit events.

CI:

  • Run the new backend integration checks in CI with pinned third-party images and failure log collection.

Tests:

  • Add Docker Compose fixtures and scripts for exercising Funnel and TESP-API integration behavior.

Add the job `integration` to `ci.yml`, with `tests/integration/`: proTES
in Docker Compose relays tasks to the official Funnel image and to the
published TESP-API image with Pulsar. `check.sh` creates, polls and
cancels tasks, with the final states and logs as clients see them, and
asks the backend for its own state of canceled tasks.

The job isn't needed by the gate yet (`NOT_IN_GATE`), as it depends on
third parties' registries and packages, and skips edits of pull requests.

Closes #422

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@uniqueg uniqueg added the type: testing Related to code testing label Nov 4, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This PR adds a Docker Compose-based integration lane that routes real tasks through pinned Funnel and TESP-API services, validates their task lifecycle and response differences, and keeps the third-party-dependent job outside the required CI gate.

File-Level Changes

Change Details Files
Adds a non-blocking CI integration job that runs proTES against pinned real TES services in Docker Compose.
  • Starts Funnel 0.11.14 and TESP-API 0.2.0 with pinned dependencies and Pulsar 0.14.16.
  • Pins TESP-API's stage image at runtime and collects Compose logs on failure.
  • Runs the integration checks for both backends, while skipping pull-request edit events.
.github/workflows/ci.yml
tests/integration/compose.yaml
tests/integration/config.yaml
tests/integration/funnel.yaml
tests/integration/pulsar.yaml
Introduces an end-to-end test script covering task execution, failure, cancellation, state reporting, and log views.
  • Creates tasks with routed backend tags and pinned executor images.
  • Verifies COMPLETE and EXECUTOR_ERROR tasks, inputs, stdout/stderr, exit codes, and FULL/BASIC responses.
  • Exercises cancellation during execution and immediately after submission, including backend-reported states and repeated cancellation.
tests/integration/check.sh
Excludes the external-service integration job from the required CI gate until it is proven reliable.
  • Defines the integration job in the explicit non-gated job set.
  • Updates gate validation to require all jobs except documented exclusions.
tests/test_workflows.py

Possibly linked issues


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 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5a866d8) to head (bfc0d15).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #426   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines         2680      2680           
=========================================
  Hits          2680      2680           

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

@uniqueg
uniqueg marked this pull request as ready for review November 4, 2026 13:00

@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 reviewed your changes and they look great!

Linked issues

#422 test: run against Funnel and TESP-API in CI · 4 of 4 met

# Requirement Status Notes
1 Add an integration job in ci.yml that runs proTES in Docker Compose against Funnel and TESP-API with Pulsar. ✅ Met The job starts the Compose setup and runs check.sh against both backends.
2 Use pinned images. ✅ Met The backend and supporting images are pinned by digest or version; CI also pulls the TESP-API staging image by digest.
3 Create, poll and cancel tasks; check their final state, including logs in the FULL view. ✅ Met check.sh exercises finishing, failing and canceled tasks, and checks FULL logs for completed and failed tasks.
4 Do not make the integration job necessary for the gate yet. ✅ Met integration is excluded from the gate's needs in tests/test_workflows.py.

Sourcery assessment

Needs a human reviewer. Funnel and Pulsar receive the runner’s Docker socket so they can start task containers; that grants these service containers control of the runner’s Docker daemon and access to its workspace. Reverting removes that access for future runs, but it cannot undo runner data or credentials exposed if the boundary is compromised.


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

@uniqueg
uniqueg merged commit 1e8967e into dev Nov 4, 2026
56 of 60 checks passed
@uniqueg
uniqueg deleted the test/real-tes-backends branch November 4, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: testing Related to code testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: run against Funnel and TESP-API in CI

1 participant