Skip to content

Releases

v0.6.0

v0.6.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 10 Nov 11:31
Immutable release. Only release title and notes can be modified.
v0.6.0
55c4d15

proTES now runs on FOCA 0.22 and foca-plugins 0.3.0, and discovers TES
instances in Cloud Registry 1.0.0rc2 again, also those that serve the TES API
at another path. Admins can limit the tasks of each user and delete finished
tasks after a number of days, both opt-in. Responses of TES instances and pages
of the view FULL are bounded in size, tasks stuck in CANCELING end after a
time, and service infos of TES instances are read without credentials. Several
changes are breaking: read the upgrade steps first. See the documentation for
details.

Breaking changes

  • proTES runs on FOCA 0.22.0 and its image: ${...} in config files references
    an environment variable, responses have the header X-Request-ID (generated,
    clients' values ignored unless server.request_id.trust_incoming), query
    parameters on operations without parameters get 400, the Celery worker
    stops on invalid access control settings, MongoDB clients time out after 5
    seconds, and refusals of the plugin gateway and log entries of requests have
    other messages; plugins that cap foca<0.22 no longer resolve against the
    image (see the upgrade
    steps
    )
    (#433, #434; #462, #463)
  • The image contains the release train foca-plugins 0.3.0 (plugins 0.1.3)
    instead of 0.2.0 (#467, #471)
  • Service infos of TES instances are read without credentials; TES instances
    that refuse anonymous reads count as TES 1.0 unless they have the label
    tes.version or custom.tes.probe_with_token is set (#436, #448)
  • Tasks still CANCELING custom.controllers.post_task.polling.max_cancel_time
    seconds (default 3600) after their cancel are set to SYSTEM_ERROR and no
    longer tracked (#437, #450)
  • Responses of TES instances are read up to custom.tes.max_response_size
    bytes (default 10 MiB, was 64 MiB for some): larger task logs are left out,
    and a larger response to a task creation leaves the task in SYSTEM_ERROR
    (#439, #452)
  • Pages of the view FULL also end before their tasks exceed
    custom.controllers.list_tasks.max_page_bytes_full bytes (10 MiB, 4 MiB in
    the Helm chart), so they may hold fewer tasks (#455, #458)
  • Docker Compose runs the images of the Helm chart, pinned to RabbitMQ 4.3.7
    and MongoDB 7.0.45; RabbitMQ may need a new volume (#435, #440)

Features

  • Opt-in limits of the unfinished and stored tasks per user
    (custom.controllers.post_task.limits) (#285, #456)
  • Opt-in retention: the Celery workers delete finished tasks
    custom.retention.finished_days days after they finished, leaving tombstones
    (#286, #457)
  • Discovered TES instances whose registry URL serves the TES API (e.g.,
    TESP-API at /v1) are used at that URL, without an entry of their own with
    api_path (#438, #451)
  • Discovery works with Cloud Registry 1.0.0rc2, whose GET /verifications
    names services by serviceId (#462, #463)
  • Responses to requests that fail the validation of the API specification
    keep the validator's reason as detail (exceptions.validation_reasons),
    and gain type, code and the invalid fields (errors) where these are
    known (#462, #463)

Security

  • By default, proTES' access token and Basic credentials are no longer sent
    with reads of service infos, so TES instances that tasks don't go to don't
    get them; custom.tes.probe_with_token: true sends them as before
    (#436, #448)
  • Requests to TES instances no longer take credentials from a .netrc file of
    the environment (#449, #454)
  • The size limit of responses of TES instances bounds the memory that reading
    them takes, also for compressed responses (#439, #452)

Fixes

  • Tasks whose TES instance never confirms a cancel are no longer tracked
    forever (#437, #450)
  • One page of the view FULL with large tasks could exceed the memory limit
    of the app (#455, #458)

Documentation

  • The upgrade path from 0.5.0 (#468, #472)

Maintenance

  • Moved to FOCA 0.21 (#433, #434) and 0.22 (#462, #463)
  • CI runs tasks on TESK in a k3s cluster, in the job Integration (TESK)
    (#423, #432)
  • Tests read the config with get_config() and cover
    exceptions.validation_reasons: false (#441, #443; #469, #470)
  • The release workflow verifies the release tag before running its scripts
    (#446, #447)
  • Removed unused models and ignore entries (#444, #445); Dependabot PRs get
    the label type: dependencies (#460, #461)

Commits

  • test: run against TESK in a k3s cluster by @uniqueg in #432
  • build: move to FOCA 0.21 by @uniqueg in #434
  • build(deps): bump the docker group across 2 directories with 1 update by @dependabot[bot] in #430
  • chore: pin Compose images to those of the chart by @uniqueg in #440
  • test: read config via get_config() by @uniqueg in #443
  • chore: remove unused .gitignore entries by @uniqueg in #445
  • ci: verify the release tag before its scripts by @uniqueg in #447
  • fix: read service infos without credentials by @uniqueg in #448
  • fix: end tracking of stuck CANCELING tasks by @uniqueg in #450
  • feat: find API paths of discovered TES instances by @uniqueg in #451
  • fix: limit the size of backend responses by @uniqueg in #452
  • fix: ignore .netrc in backend requests by @uniqueg in #454
  • build(deps): bump the python-dependencies group across 1 directory with 4 updates by @dependabot[bot] in #453
  • feat: limit tasks per user (opt-in) by @uniqueg in #456
  • feat: retain finished tasks for N days (opt-in) by @uniqueg in #457
  • fix: bound FULL task pages by size in bytes by @uniqueg in #458
  • build: bump FOCA to 0.22.0 by @uniqueg in #463
  • ci: label Dependabot PRs by @uniqueg in #461
  • test: cover validation_reasons turned off by @uniqueg in #470
  • build: pin the foca-plugins 0.3.0 release by @uniqueg in #471
  • build: prepare the 0.6.0 release by @uniqueg in #472

Full Changelog: v0.5.0...v0.6.0

v0.5.0

v0.5.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 05 Nov 00:57
Immutable release. Only release title and notes can be modified.
v0.5.0
ee45ef5

proTES now serves TES 1.1 and relays tasks to TES instances of both TES 1.0
and 1.1, adapting each task to the version of the instance that runs it. It
moves to FOCA 0.20 and an image without pip, whose dependencies are locked and
hash-checked. TES instances can set their own API path, so TESP-API works
without a rewriting proxy, and the view FULL now serves the logs of the TES
instance. Lookups of addresses at third parties become opt-in. Tested in CI
against real instances of Funnel 0.11.14 and TESP-API 0.2.0, but not against
TESK or on Rahti. Several changes are breaking: read the upgrade
steps

first. See the documentation for
details.

Breaking changes

  • API: after a request to cancel it, a task stays CANCELING until its TES
    instance reports a final state, where it was CANCELED right away before;
    tasks may also be PREEMPTED, so clients that accept only the states of
    TES 1.0 (e.g., py-tes before 1.1) need an update (#241, #392, #405)
  • Tasks with ignore_error: true, strict backend_parameters or wildcards in
    output paths no longer go to TES instances of TES 1.0: they get 400 if no
    TES 1.1 instance is selected, or 503 if an instance is unconfirmed (see
    TES versions)
    (#393, #394, #405)
  • Funnel and other TES instances that report no valid TES version count as TES
    1.0, and need the label tes.version: "1.1"; Funnel 0.11.14 reports an empty
    type.version (see TES
    versions
    )
    (#393, #405)
  • API: outputs with wildcards in their path and without path_prefix get
    400, as TES 1.1 requires it, also if the path means *, ? or [...]
    literally (e.g., /data/sample[1].txt), which TES 1.1 can't escape: set
    path_prefix for them (#418, #421)
  • API: tasks with a path over 4096 bytes get 400 (path of inputs and
    outputs, path_prefix, volumes, and workdir, stdin, stdout and
    stderr of executors) (#408, #410)
  • The default pipeline is random routing, without lookups at third parties;
    tes.routing.distance is no longer available unless it is listed in
    plugins.available, and pipelines that use it without that stop the app at
    startup (see the upgrade
    steps
    )
    (#384, #385)
  • proTES runs on FOCA 0.20 and foca-plugins 0.2.0. The image has no pip, so
    pip install in derived images and init scripts fails, and the recipe for
    derived images changes; plugins that cap foca<0.20 no longer resolve;
    records in failed_runs are keyed by run-<run ID> (see Plugin
    images
    )
    (#399, #336, #407)
  • Helm chart: the chart sets max_page_size_full to 6 instead of the app's 64,
    as one page of the view FULL could exceed the memory limit of 256 MiB, so
    clients get smaller pages. config.custom: null and helm upgrade --reuse-values keep 64 (#414, #420)
  • Helm chart: the chart uses foca-common 0.4.0, whose rendering fails on some
    values that it accepted before (see the upgrade
    steps
    )
    (#398, #406)
  • The filters tag_key and tag_value of GET /tasks need MongoDB 5.0 or
    later; other requests are not affected (#392, #405)

Features

  • proTES serves TES 1.1.0, with the filters state, tag_key and tag_value
    of GET /tasks and path_prefix in outputs (#241, #392, #405)
  • proTES reads the TES version of each TES instance from its service info or
    the label tes.version, and adapts tasks to it (#393, #394, #405)
  • TES instances can set their API path (api_path, apiPath in the chart),
    e.g., /v1 for TESP-API (#411, #417)
  • The view FULL serves the standard output and error and the system logs of
    the TES instance, stored once a task has finished, at most
    post_task.max_log_size per task (1 MiB by default, 0 turns it off), so
    stored tasks and pages of the view FULL get larger; tasks that finished
    before keep what they have (#413, #419)
  • custom.service_info.list_backends leaves the TES instances out of the
    public service info (#396, #366, #401)
  • Helm chart: values for the plugin store's key secret, for several pods of
    the app and for its probes (#398, #406)

Security

  • A crafted output path could block a worker, as the check for wildcards took
    quadratic time; it now takes linear time (#408, #410)
  • The hosts of inputs are looked up at DB-IP and Nominatim only if the admin
    enables tes.routing.distance (#384, #385)
  • The image installs exactly what uv.lock locks, hash-checked (#365, #389)
  • The image has no pip or uv, and CI checks that; the accepted vulnerabilities
    of packages vendored by pip are gone (#336, #383, #386, #407)
  • Startup errors of the config no longer show the invalid input, and URLs of
    the identity provider with user info stop the app at startup, as they would
    end up in the logs (#399, #407)

Fixes

  • Tasks of TES instances that add fields to tasks, e.g., author of TESP-API,
    stayed UNKNOWN forever; they are now tracked to their final state
    (#409, #412)
  • A cancel that the TES instance refuses because the task has finished or is
    gone gets 200; other refusals and failures get 502 instead of 500
    (#418, #421)
  • Further log entries of a TES instance (e.g., of retries) no longer lose the
    logs and outputs of a task (#418, #421)
  • Discovered TES instances fail over when a TLS handshake fails or a request
    is invalid, as nothing was sent (#399, #407)

Documentation

  • Which TES implementations were tested, and notes on them: Funnel 0.11.14 and
    TESP-API 0.2.0 ran in CI; TESK and a deployment on Rahti were not tested
    (#427, #428; #429, #431)
  • Deployment on OpenShift (#418, #421)
  • The upgrade path from 0.4.0 (#387, #388; #429, #431)

Maintenance

  • CI runs tasks on real instances of Funnel and TESP-API with Pulsar, in the
    job Integration, which is not part of the gate (#422, #426)

Commits

Full Changelog: v0.4.0...v0.5.0

v0.4.0

v0.4.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 01 Nov 18:58
Immutable release. Only release title and notes can be modified.
v0.4.0
ed1c90c

proTES now processes tasks with FOCA's plugin engine instead of its own
middlewares, on FOCA 0.19: plugins check or change tasks, choose the TES
instances and their order, and record the provenance of each task, which
users read through the API. The image ships the routing plugins of
foca-plugins (tes.routing.distance and generic.routing.random), so that,
as in 0.3.0, tasks go to the TES instance closest to their input data, with
random order as the fallback. The release is built from locked, hash-checked
dependencies, and removes forwarded_to from task logs. Several changes are
breaking: read the upgrade
steps

first. See the documentation for
details.

Breaking changes

  • Plugins replace the middlewares: new tasks pass through a pipeline of FOCA
    plugins (plugins.pipeline), and custom.middlewares is refused at
    startup. The middleware management API and its collection are removed, and
    custom middlewares must be ported to plugins. Tasks that no TES instance
    accepts fail with 503 (was 500), requests that already passed proTES
    with 508 Loop Detected (if server.public_url or plugins.gateway_id
    is set), and tasks with tags under gateway. other than
    those of the clients' choices with 400 (see
    Plugins)
    (#333, #346; #315, #320; #316, #317)
  • proTES runs on FOCA 0.19 (was 0.17): custom configs must apply the config
    changes of FOCA 0.18 and 0.19, and the image and the Helm chart of this
    release must be deployed together (see FOCA 0.18 and
    0.19
    )
    (#331, #338; #359, #360)
  • TES instances are listed in custom.tes.backends (in the Helm chart,
    tes.backends) instead of custom.tes.service_list and
    custom.tes.discovery (see TES instance
    list
    )
    (#332, #340)
  • API: logs[].metadata.forwarded_to is removed without a deprecation
    period, also from tasks stored by earlier versions; clients read the TES
    instance and the remote identifier from the gateway tags gateway.backend
    and gateway.backend_task_id. custom.storeLogs is refused at startup
    (see Forwards in task
    logs
    )
    (#324, #374)
  • Access control: custom lists of security.access_control.policies must
    add the rules users-list-plugins, users-get-plugins,
    owners-get-provenance and admins-get-provenance, or users get 403
    (#322, #352; #218, #357)
  • Database: proTES uses the new collections plugin_builds, pipelines,
    failed_runs and plugin_store, and creates indexes on startup: its
    database user needs the right createIndex (see Task
    provenance
    )
    (#334, #349)

Features

  • The image ships the routing plugins tes.routing.distance and
    generic.routing.random of foca-plugins, pinned and hash-checked in
    uv.lock, and the default pipeline is distance routing with random order
    as the fallback again, as in 0.3.0. With the default settings, the hosts of
    inputs are looked up at DB-IP and Nominatim; set provider: offline and a
    GeoIP database, or FOCA's foca.routing.ordered, to avoid third parties
    (see
    Routing)
    (#379, #381)
  • Task provenance: proTES stores the provenance of each task's plugin
    pipeline run and serves it with GET /tasks/{id}/provenance to the task's
    owner and to admins; new tasks have FOCA's gateway tags (gateway.*)
    that summarize it (#334, #349; #322, #352)
  • Clients may choose the plugins and the TES instances of a task with the
    tags gateway.pipeline (if the admin enables it) and gateway.backends,
    and list what they may choose with GET /plugins; each choice applies to
    its task only (#218, #357)
  • Helm chart: values for the plugins (plugins) and for the settings of the
    identity provider's issuer (#335, #348; #337, #341)

Security

  • Requests to TES instances discovered in service registries go through
    FOCA's guarded HTTP client, which checks the address of each connection,
    so that a host whose addresses change after discovery can't lead requests
    with proTES's token to private addresses (#339, #347)
  • .env files, PEM, key and PKCS#12 files are excluded from the Docker
    build context everywhere, also below pro_tes/ (#361, #367)
  • The dev-image push job, which holds the Docker Hub credentials, now derives the version with build requirements installed from uv.lock with hash checks, exported by a digest-pinned uv image (#376, #378)

Fixes

  • The forwarding of a task, with its state request, takes at most 55 seconds
    with the default settings (plugins.defaults.forward_timeout: 20, was
    FOCA's 60), within the 60 seconds of common proxies' read timeouts; other
    work, e.g., registry reads, token requests and database writes, comes on
    top. Tokens of service registries are no longer logged (#364, #369)
  • Middlewares kept the order of the TES instances, and the changes of failed
    middlewares were undone, before the plugins replaced the middlewares
    (#314, #319; #313, #318)

Documentation

  • The upgrade path from 0.3.0 (#362, #363, #368)
  • A recipe for images derived from the image of proTES with other plugins,
    pinned by hash, tested in CI with a test plugin (#323, #355)
  • The org-wide community files replace those of the repository, including
    the contributing guide (#325, #326; #370, #372)
  • The README logo, the Zenodo DOI and the docs badge (#350, #351; #307,
    #309, #311)

Maintenance

  • CI's lint, test, chart and docs jobs install the hash-checked versions from a new uv.lock (uv sync --locked), and Dependabot updates pyproject.toml and the lock together (#375, #377)
  • CI passes in forks, uses the org's shared actions for the CI gate and for
    scanning images, checks pull request titles under the gate, and checks the
    chart before signing anything; workflow and job names are aligned and
    prepared for the repository name protes (#327, #328; #330, #342; #329,
    #343; #371, #373; #353, #354; #310, #312; #356, #358)
  • Sourcery skips rule-test fixtures (#306)
  • Dependabot updates of the pre-commit hooks and of the GitHub Actions (#344,
    #345)

Commits

Read more

v0.3.0

v0.3.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 24 Oct 13:55
v0.3.0
8af9c36

The first release, with the app image, the Helm chart and these notes
published together. It changes almost everything since the last deployed
version (images tagged by date, FOCA 0.12) and the legacy charts (2.x and
3.0.0): proTES now requires FOCA 0.17.0 (or a later 0.17 release) and Python
3.13 or later, requires access tokens, gives each task to the user who
created it, calls TES instances with credentials of its own, can discover
them in a service registry, forwards each task exactly once, tracks tasks
without blocking workers, and has a hardened chart and image. Many of the
changes are breaking: read the upgrade
steps
first. See the
documentation for details.

Known limitations of this release:

  • per-user limits on stored or unfinished tasks are not available yet
    (#285); limit requests at the ingress controller (see "Rate limits" on the
    Configuration page of the documentation);
  • finished tasks are kept until they are deleted by hand: retention is not
    available yet (#286);
  • each task adds two owner rules to the access control database, and FOCA
    0.17 loads all rules for each request, so requests slow down as the number
    of tasks grows; FOCA 0.18 will cache the policy enforcer;
  • once CANCELED is stored, the resume sweep of the workers ignores the
    task: if its tracking is lost afterwards, its final logs may be missing
    (see "Task tracking" on the Operations page of the documentation).

Breaking changes

  • API: all TES endpoints except GET /service-info require an access token
    of a trusted issuer (security.auth.issuers) for a configured audience
    (security.auth.audience), and a role from the groups of the identity
    provider (security.access_control.claim_groups, group_mapping);
    before, anyone could create, list, read and cancel all tasks. HTTP Basic
    credentials of callers are no longer passed through to TES instances (see
    Authentication)
    (#212, #240)
  • API: bearer tokens must be access tokens as per RFC 9068 (typ header
    at+jwt); other tokens, such as ID tokens, are rejected (401). The new
    option security.auth.clients limits the accepted tokens to those of
    certain clients (see
    Authentication)
    (#214, #245)
  • API: each task belongs to the user who created it: users list, read and
    cancel only their own tasks, and admins can no longer see tasks; they only
    manage the access control rules. Tasks of others and unknown tasks get
    403 (was 404 for unknown tasks). The rule users-get-cancel-tasks is
    replaced by owners-get-cancel-tasks, and the access control model has
    owner roles and no admin bypass. Tasks stored by earlier versions have no
    owner, so nobody sees them until operators give them to their users (see
    Task
    ownership
    )
    (#153, #215, #250)
  • API: errors are problem details (title, status, detail, sent as
    application/json) instead of objects with message and code; request
    bodies are limited to 1 MiB (413) (see
    Errors)
    (#203, #219)
  • API: times of tasks (creation_time, and start_time and end_time of
    the logs) are UTC RFC 3339 date-times instead of local-time strings;
    proTES sets creation_time and rejects tasks that set it (400), as the
    TES specification marks it read-only (see Task times and remote
    identifiers
    )
    (#208, #238)
  • API: GET /tasks returns an empty next_page_token on the last page (it
    returned the last task's identifier, so clients kept paging) and an empty
    page if no task matches; invalid page tokens and page sizes are rejected
    (400); pages have 256 tasks by default (was 5) and at most 2047;
    name_prefix is taken literally, not as a regular expression (see Task
    listing
    )
    (#165, #208, #238)
  • API: pages of the view FULL have at most 64 tasks
    (custom.controllers.list_tasks.max_page_size_full), also by default, so
    clients that list full tasks must follow next_page_token; inline
    contents of inputs (inputs[].content) over 128 KiB
    (custom.controllers.post_task.max_inline_content) are rejected with
    413 Content Too Large (see
    Task listing)
    (#284, #292)
  • API: tasks that no TES instance accepts (500), and tasks that fail
    validation after the middlewares (400), are deleted with their owner's
    roles instead of being kept as SYSTEM_ERROR (see Stored
    tasks
    )
    (#284, #292)
  • API: proTES sends each task to a TES instance with a single request, to
    <url>/ga4gh/tes/v1 only (earlier versions also tried <url>/v1 and
    <url>), without following redirects, and no longer fails over to the
    next path or TES instance when the outcome is unknown (read timeouts,
    connections lost after sending, 5xx): such tasks fail with
    SYSTEM_ERROR and 502 Bad Gateway, as the TES instance may run them
    (see TES instances and their
    credentials
    )
    (#274, #282)
  • API: unfinished tasks whose identifier at their TES instance is unknown
    can't be canceled (409 Conflict; was 500, or 200 without effect for
    tasks in state UNKNOWN); tasks in state UNKNOWN are now canceled at
    their TES instance. New tasks are stored with the state that their TES
    instance reports, instead of UNKNOWN (see
    Task times and remote identifiers)
    (#275, #291)
  • API: tasks with credentials in the URLs of their inputs or outputs
    (https://user:password@host/...) are rejected (400), for all TES
    instances; custom.controllers.post_task.url_credentials: strip removes
    the credentials instead (see
    TES instances and their credentials)
    (#213, #251)
  • API: logs[].metadata.forwarded_to is a list of forwards (id, url,
    forward_time) instead of a nested tesNextTes object; tasks stored by
    earlier versions are served with their forwards as lists (see
    Stored tasks)
    (#173, #219)
  • API: the middleware management API is no longer registered, as its
    controllers don't exist yet (see
    Middleware management API)
    (#196; #203, #219)
  • Configuration: custom configs must apply the config changes of FOCA 0.14
    to 0.17 (e.g., exceptions.mapping; see the FOCA release notes and
    migration guides). The API specification (tes) and the access control
    rules are named entries, which overlays change by name; the service info
    is configured in service_info.service and no longer stored in the
    database (see
    Configuration)
    (#203, #219; #214, #245)
  • Configuration: the identity provider is deployment configuration, without
    defaults: proTES refuses to start without trusted issuers, an audience and
    a group of the role admin (unless
    custom.access_control.require_admin is false), without enforced access
    control, or with service clients, which it doesn't support yet (see
    Authentication)
    (#212,
    #240; #215, #250)
  • Configuration: unknown keys in custom are errors: the app and the Celery
    worker refuse to start, naming them, instead of ignoring them. Remove the
    keys that had no effect from config overlays: custom.celery,
    custom.controllers.celery and custom.controllers.post_task.timeout
    (post, poll, job); requests to TES instances time out after
    custom.tes.timeout seconds instead (default 15, was a hard-coded 5)
    (see
    Configuration)
    (#276, #281; #274, #282)
  • Configuration: entries of custom.tes.service_list are objects with the
    URL of the TES instance (url) and how proTES authenticates at it
    (auth: client_credentials by default, basic or none), instead of
    URLs; with client_credentials, the app and the Celery worker need
    PROTES_CLIENT_ID and PROTES_CLIENT_SECRET and refuse to start without
    them. URLs of TES instances must be https URLs without credentials
    (unless custom.tes.url_schemes allows http); tasks are only forwarded
    to configured (or discovered) TES instances. Custom middlewares that read
    custom.tes.service_list get these entries instead of URLs (see
    TES instances and their credentials)
    (#213, #251)
  • Configuration: the base config lists no TES instances (it listed public
    ones), and the default service info describes the app with placeholders
    on reserved example domains (RFC 2606; id is org.example.protes);
    deployments set their own, and the app warns on startup while the
    placeholders are set (see
    TES instances and their credentials)
    (#229, #251, #263; #205, #220)
  • Configuration: custom.controllers.post_task.polling.wait and attempts
    must be positive, and wait and the new max_wait below 1800 seconds;
    custom.controllers.list_tasks.default_page_size must not exceed
    max_page_size (see
    [Task tr...
Read more