Skip to content

v0.8.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 30 Nov 22:36
· 3 commits to dev since this release
Immutable release. Only release title and notes can be modified.
v0.8.0
ef5b350

proTES can now authenticate at TES instances with an API key (auth: api_key, e.g., for Poiesis), pass the identity of the submitter of each task
on to TES instances for accounting and audit, let service clients name the
user they run a task for, and, with accounting, count usage per such user,
all opt-in. The permissions API, through which admins could make
themselves owners of the tasks of others, is off by default, and config
overlays that name its removed admin rules or the old rule
users-create-list-tasks (now split in two) stop the start; tags that
clients set under submitter. are no longer relayed, and tasks that their
TES instance no longer has end with SYSTEM_ERROR. RabbitMQ now holds
scheduled polls until they are due (new queue protes), so polls that
back off no longer hold up those of other tasks; external brokers need
RabbitMQ 3.10 or later and more permissions. Read the upgrade
notes

before upgrading, also for the rules stored through the permissions API.
This release was tested against Funnel 0.12.3 (TES 1.1, by label and from
its service info), TESP-API 0.2.0 with Pulsar 0.14.16 (TES 1.0) and
tesk-api 1.1.0 with the taskmaster and filer v0.10.6 (TES 1.0) in CI;
tesk-api 2.0.0 (TES 1.1) and Poiesis were not tested (CI checks the API
keys against a stand-in TES instance only). See the
documentation for details.

Breaking changes

  • Permissions API off: FOCA's permissions API
    (/admin/access-control/permissions) is off by default
    (security.access_control.api_enabled: false, its paths get 404), and
    its rules admins-list-add-permissions and admins-manage-permissions
    are removed; overlays that remove them (null) stop the start; an
    overlay can turn the API on again, and proTES then warns on startup (see
    the upgrade
    notes
    )
    (#515, #539)
  • The rule users-create-list-tasks is split into users-create-tasks
    (POST /tasks, role user) and authenticated-list-tasks (GET /tasks, any authenticated caller, who sees only their own tasks);
    proTES refuses to start if an overlay names the old rule or removes it
    with null: rename it (to stop task creation, set users-create-tasks: null) (#519, #518)
  • Tags of clients under submitter. are no longer relayed to TES
    instances (they are still stored with the task and returned to its
    owner), so that nobody can pass another identity off as the one proTES
    sends; clients that use this prefix for tags of their own must rename
    them (#254, #540)
  • Tasks that their TES instance no longer has (404 Not Found or 410 Gone on every poll) are set to SYSTEM_ERROR with a system log after
    custom.controllers.post_task.polling.max_gone_time seconds (default
    3600) and no longer tracked; before, they became UNKNOWN and were polled
    forever (see the upgrade
    notes
    )
    (#544, #547)
  • Polls go to proTES' own queue protes (a quorum queue on the topic
    exchange protes), and RabbitMQ holds scheduled polls in delay queues
    (quorum queues celery_delayed_0 to celery_delayed_27, Celery's native
    delayed delivery) until they are due. The bundled RabbitMQ of the Helm
    chart and of Docker Compose needs no change; an external broker must be
    RabbitMQ 3.10 or later and give proTES' user the permissions listed in
    Task
    tracking
    .
    A worker that can't set up these queues, or can't reach the broker for
    about 2 minutes when it starts, exits instead of losing polls (or
    retrying forever). Workers still read the old queue celery, so polls
    scheduled by earlier versions run during a rolling upgrade (a later
    release stops reading it, #556; see the upgrade
    notes
    ,
    also for downgrades) (#549, #555)

Features

  • API keys for TES instances: an entry of custom.tes.backends with auth: api_key sends proTES' key at that TES instance, from the environment
    variable api_key.key_env (or the file named in <key_env>_FILE), as
    Authorization: Bearer <key> or in another header (api_key.header),
    when creating, getting and canceling tasks there, also by the Celery
    worker, and for its service info only with
    custom.tes.probe_with_token (as for tokens); the app and the worker
    refuse to start without a usable key, keys never appear in the config,
    the logs, the database or plugins, and redirects to other hosts drop
    them. Configured TES instances only (not those of a service registry);
    the TES instance sees all tasks of proTES as tasks of the key's account
    (see API keys of TES
    instances
    ).
    The Helm chart takes apiKey.keyEnv and apiKey.header in tes.backends
    (#529, #530)
  • User identity at TES instances: TES instances can get the identity of the
    submitter of each task as tags (submitter.iss, submitter.sub,
    submitter.sub_source, submitter.client_id), for accounting and
    audit; opt-in per TES instance or registry with identity_tags (Helm
    chart: identityTags in tes.backends); the subject is personal data,
    so check your privacy notice before switching it on (see User identity
    at TES
    instances
    )
    (#254, #540)
  • Service clients acting for users: service clients with on_behalf_of: true (refused at startup until now) can name the user a task is for in
    the header that custom.controllers.post_task.on_behalf_of_header
    names; the user is stored with the task (acting_for) and passed on as
    submitter.sub to TES instances with identity_tags, and the client
    stays the owner (see Acting for
    users
    )
    (#254, #540)
  • Usage per named user: with accounting on (custom.accounting.enabled),
    usage records hold the user that a service client ran a task for
    (acting_for, personal data like user_id, with a new index of usage
    on acting_for and finished_at), and GET /usage
    (admins only) takes acting_for=<sub> to count only that user's tasks
    and group_by=acting_for to split the totals per owner and named user;
    the default response and execution reports are unchanged (see the
    upgrade
    notes
    )
    (#541, #546)

Security

  • Admins can no longer make themselves owners of the tasks of others (and
    read and cancel them) through the permissions API, which accepts any
    rule, as long as it stays off (the default); deployments that turn it on
    again keep that risk. Rules stored through it earlier stay in effect: the
    upgrade notes show how to find and delete them (#515, #539)
  • Execution reports (GET /usage/reports) leave out the query, fragment and
    user info of TES URLs, and name no TES instance for malformed URLs, as a
    safeguard for records that hold them (e.g., imported or edited by hand);
    proTES itself records URLs without them (#524, #537)
  • Errors about API keys of TES instances name the TES instance by its URL,
    no longer the variable in key_env, so a key pasted there by mistake
    doesn't show in startup or request errors (#533, #534)

Fixes

  • Owners who lost the role user (e.g., whose group membership was
    revoked) can list their own tasks again, as they could already read and
    cancel them (#519, #518)
  • When a TES instance reports a final state that the view FULL
    contradicts (e.g., a TESK that briefly answers SYSTEM_ERROR while the
    Job of a task is finishing), proTES polls the task again, up to 5 times,
    until both agree, instead of storing the first state without logs;
    stored tasks get the fields tracking.disagreements and
    tracking.disagreed_poll (see Task
    tracking
    )
    (#527, #536)
  • Once a task has finished, start_time and end_time of its task logs are
    those that its TES instance reports, in UTC, no longer when proTES
    received and forwarded the task; creation_time still says when proTES
    received it (see Tasks)
    (#528, #538)
  • With RabbitMQ 4, two tasks whose polls backed off (e.g., while their TES
    instance was down) no longer stop the polls of all other tasks, including
    new ones, for up to polling.max_wait seconds: RabbitMQ holds scheduled
    polls until they are due (see Breaking changes), and for polls in the old
    queue celery the worker reserves 32 messages per process
    (worker_prefetch_multiplier, was 1; the Helm chart's worker.command
    passes --prefetch-multiplier=32) (see Task
    tracking
    )
    (#543, #548, #550, #549, #555)
  • No Pydantic serialization warning at startup of the app and the worker
    with a TES instance on auth: api_key, and config dumps keep the
    settings of proTES' TES instances (#533, #534)

Documentation

  • Notes on Poiesis as a TES instance of proTES (see Notes on TES
    implementations
    ),
    and how to create and rotate the Secret with an API key in the chart's
    README; the rotation command works for any release name (#529, #530,
    #533, #534)

Maintenance

  • The release workflow registers the released image at Pubgrade (job
    Notify Pubgrade), which notifies the subscribed deployments, if the
    variable PUBGRADE_URL is set (see
    Pubgrade)
    (#535, #542)

Commits

  • feat: API key auth for TES backends by @uniqueg in #530
  • build: prepare the 0.8.0 release by @uniqueg in #532
  • fix: tidy up the API-key backend follow-ups by @uniqueg in #534
  • fix(accounting): strip TES URL queries in reports by @uniqueg in #537
  • fix: re-poll when final states disagree by @uniqueg in #536
  • fix: store the TES backend's task times by @uniqueg in #538
  • fix: let former members list their own tasks by @uniqueg in #518
  • fix: keep admins away from others' tasks by @uniqueg in #539
  • feat: pass submitter identity to TES backends by @uniqueg in #540
  • ci: notify Pubgrade of released images by @uniqueg in #542
  • fix: end tasks their backend no longer has by @uniqueg in #547
  • fix: size the worker for held polls by @uniqueg in #550
  • feat: report usage of tasks run for named users by @uniqueg in #546
  • fix: delay polls in the broker, not the worker by @uniqueg in #555
  • build: finish the 0.8.0 release notes by @uniqueg in #554

Full Changelog: v0.7.0...v0.8.0