Skip to content

Latest commit

 

History

History
606 lines (591 loc) · 38.6 KB

upgrading.md

File metadata and controls

606 lines (591 loc) · 38.6 KB

Upgrading

To 2.1.0

  • Service clients: audiences per client (breaking). With tokens of service clients on (TESK_API_AUTHORISATION_SERVICE_CLIENTS_ENABLED), each client is listed with its own audiences, and a client's token is accepted only for one of them (#215): one JSON variable, TESK_API_AUTHORISATION_SERVICE_CLIENTS_CLIENTS, replaces TESK_API_AUTHORISATION_SERVICE_CLIENTS_CLIENT_IDS and TESK_API_AUTHORISATION_SERVICE_CLIENTS_AUDIENCE, which are removed: with either of them still set (also to an empty value: remove them), or without the new one, TESK API doesn't start. Convert them as follows (see Tokens of services):

    # 2.0.0
    TESK_API_AUTHORISATION_SERVICE_CLIENTS_CLIENT_IDS=gateway,smoke
    TESK_API_AUTHORISATION_SERVICE_CLIENTS_AUDIENCE=https://tesk.example.org
    # 2.1.0
    TESK_API_AUTHORISATION_SERVICE_CLIENTS_CLIENTS='{"gateway": {"audiences": ["https://tesk.example.org"]}, "smoke": {"audiences": ["https://tesk.example.org"]}}'

    Each client gets the former shared audience; then give each client its own audiences where your provider allows, so that one client's tokens aren't accepted for another's. Without …_AUDIENCE (any audience), give each client its audiences: any audience is no longer the default. {"allowAnyAudience": true} keeps the former behaviour for a client, but accepts every token that the issuer issues to it, also tokens meant for other services (so a token leaked from or replayed by another service works at TESK API): use it only for testing or while setting up a federation, not in production (TESK API logs a warning at startup for each such client; see Trust implications). For a downgrade to 2.0.0, restore …_CLIENT_IDS and …_AUDIENCE: 2.0.0 ignores …_CLIENTS, and without …_CLIENT_IDS it doesn't start. With the Helm chart of TESK, use the chart release that renders the new variable (auth.tokenClients.clients as a map from client ID to audiences, see TESK#336); older chart releases render the removed variables, which stop TESK API 2.1.0 from starting. During a rolling update, pods of 2.0.0 still accept every listed client's tokens for the former shared audience: the audiences per client hold once the rollout has completed. Without service clients, nothing changes.

  • Tasks visible to their owner only (behaviour change, security). With the auth profile, users get, list and cancel only their own tasks, whatever their groups (#218): super admins no longer see all tasks of the installation, and team admins no longer see the tasks of other members of their teams; requests for other users' tasks give 403 Forbidden, and lists leave them out. Groups still decide who may create tasks. Handle stuck or abusive tasks through Kubernetes (e.g. with kubectl). To keep the previous behaviour, set TESK_API_AUTHORISATION_TASK_VISIBILITY=group (see Task visibility); the Helm chart of TESK can't set it yet. With owner, tasks created before 1.2.0, which have only the old creator label, are visible to nobody unless TESK_API_AUTHORISATION_LEGACY_USER_LABELS is on (with group, team admins and super admins still see them). No effect with the noauth profile. During a rolling update, pods of the old version still answer with the old rules: owner-only visibility holds once the rollout has completed.

  • /v2/api-docs is gone. The alias of the API description at its former path, deprecated in 2.0.0, is removed (#188): /v2/api-docs gives 404 Not Found, or with the auth profile 401 Unauthorized without a token, as any other unknown path. Point tools and clients that still read it to /v3/api-docs (JSON) or /v3/api-docs.yaml (YAML), which serve the same OpenAPI 3.1 description as before.

  • Resources of the taskmaster (behaviour change). The taskmaster's container requests CPU 100m and memory 128Mi, and is limited to CPU 500m and memory 256Mi (before: no requests or limits, or a LimitRange's defaults), so that it is admitted in namespaces with a CPU quota (#209). A taskmaster uses about 80 MB; check the limits against your largest tasks, and change them with TESK_API_TASKMASTER_RESOURCES, or set it to {} for none (see Configuration). In namespaces with a LimitRange whose minimum is above these requests or whose maximum is below these limits, set them to fit: otherwise Kubernetes refuses the taskmaster's pod and tasks stay QUEUED.

  • Default CPU of executors (behaviour change). Executors of tasks that set no resources.cpu_cores request and are limited to 1 CPU (before: none, or a LimitRange's defaults). Change it with TESK_API_TASKMASTER_EXECUTOR_DEFAULT_CPU, or set it to an empty value for none. In namespaces with a LimitRange whose CPU maximum is below 1 (or minimum above 1), lower (or raise) it, or set it empty: otherwise Kubernetes refuses these executors, and their tasks end in SYSTEM_ERROR.

  • Memory limits of executors (behaviour change). Executors of tasks that set resources.ram_gb get it as the memory limit too, also with resources.cpu_cores (before: only without cpu_cores, when the taskmaster set the limits to the requests; with cpu_cores, there was no memory limit, or a LimitRange's default, which could be below the request, so that the executor never started; see tesk-core#160).

  • Team names in labels. Members of teams whose names aren't valid Kubernetes label values (e.g. BioHackCloud%20Admins from LS Login, names with other characters than [A-Za-z0-9._-], or longer than 63 characters) can create and list tasks; before, both failed with 500 Internal Server Error (#216). Tasks get the team name in the annotation creator-group-name, and the label of that name is a hash for such names (see Task creators). Other team names are labelled as before, so existing tasks keep their teams. To select the tasks of such a team with kubectl, use the hash (e.g. kubectl get jobs -l creator-group-name=sha256-$(printf %s 'BioHackCloud%20Admins' | sha256sum | cut -c1-32)), or read the annotation. After a downgrade to 2.0.0 or earlier, tasks of teams with hashed labels are visible to super admins only.

  • Security contexts. New settings give the taskmaster's and the executors' pods and containers security contexts, e.g. for namespaces that enforce the restricted Pod Security Standard (#209; see Restricted clusters). They are unset by default, and the pods' security contexts stay as they were. In such namespaces, the filers need taskmaster 0.12.0 or later (TESK_API_TASKMASTER_IMAGE_VERSION and TESK_API_TASKMASTER_FILER_IMAGE_VERSION; the default is still 0.11.0). The executors' pod security context from the ConfigMap CONFIGMAP still works; the new setting goes on top of it.

To 2.0.0

From 1.2.0, deployments may have to check their JVM options, the order in which they upgrade TESK API and the taskmaster, and the taskmaster's rights; the new options are off by default. TESK API 2.0.0 accepts the task fields, list filters and states of TES 1.1, and clients may notice changed answers: read all of the items below before you upgrade.

  • Java 21. The image runs TESK API on Java 21 instead of Java 8 (see Deployment). If you pass options to the JVM in JAVA_OPTS, check that Java 21 still accepts them: options that it removed (e.g. -XX:MaxPermSize, -XX:+UseConcMarkSweepGC, -XX:+UseCGroupMemoryLimitForHeap) stop the JVM at startup. Without JAVA_OPTS, nothing changes.
  • Spring Boot 4. TESK API runs on Spring Boot 4.1 (Spring Framework 7, Spring Security 7, Jackson 3) instead of 2.7, which is out of support. Its own settings (see Configuration) and the API stay as they were, apart from the items below. If your deployment sets properties of Spring Boot itself (e.g. SERVER_*, SPRING_*, MANAGEMENT_*), check them against the migration guides of Spring Boot 3.0 and 4.0: renamed or removed properties are ignored. The timestamps of the log lines are in ISO 8601 format (e.g. 2026-11-15T19:22:01.123+01:00).
  • API description at /v3/api-docs. The API description is OpenAPI 3.1 at /v3/api-docs (and as YAML at /v3/api-docs.yaml; generated by springdoc-openapi instead of Springfox), instead of Swagger 2.0 at /v2/api-docs. /v2/api-docs serves the same OpenAPI 3.1 description in 2.0.0, so that its users can move; 2.1.0 removes it (see To 2.1.0). Point tools and clients that read the description to /v3/api-docs, and check those that read Swagger 2.0 or generate code from it (schema names, e.g. TesInput, and the layout differ). The paths, fields and status codes it describes are the same. The server URL in the description (which the Swagger UI uses for "Try it out") comes from the request, with the X-Forwarded-* headers of a reverse proxy (see "Forwarded headers" below).
  • Forwarded headers. TESK API takes the scheme, host and port of requests from the X-Forwarded-Proto, -Host and -Port headers, and the client address from X-Forwarded-For, if the request comes from an internal address (e.g. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, loopback), now also outside Kubernetes (e.g. Docker behind nginx): the new default SERVER_FORWARD_HEADERS_STRATEGY=native replaces the property server.use-forward-headers, which Spring Boot no longer reads. Behind a proxy that terminates TLS and sends X-Forwarded-Proto: https, answers with the auth profile then also carry Spring Security's Strict-Transport-Security header (one year, includeSubDomains). In Kubernetes, Spring Boot already did both; up to 1.2.0, Springfox also read X-Forwarded-Host of any client for the API description. If your proxy has a public address, set SERVER_TOMCAT_REMOTEIP_INTERNAL_PROXIES to ranges that contain it. If clients reach TESK API from internal addresses without a proxy (e.g. through a port that Docker publishes, as the requests then come from the Docker bridge), they can set these headers themselves; this changes only what TESK API answers them (e.g. the server URL in their API description). Set SERVER_FORWARD_HEADERS_STRATEGY=none to ignore the headers (see Configuration).
  • Swagger UI configuration. With the Swagger UI on, its configuration is at /v3/api-docs/swagger-config instead of /swagger-resources; the Swagger UI itself (/swagger-ui/index.html), the redirect from / and the redirect URL of its OpenID Connect client (/swagger-ui/oauth2-redirect.html) stay. The paths of Springfox (/swagger-resources/**, /configuration/**) are gone: with the auth profile, a request without a token gets 401 Unauthorized for them instead of 404 Not Found, as for other unknown paths.
  • Messages for unreadable JSON. The status codes for request bodies that aren't valid JSON or don't match the task's fields stay (400 Bad Request), but the messages come from Jackson 3 and may be worded differently (e.g. Unrecognized property "unknown" instead of Unrecognized field "unknown"). Don't parse them.
  • Upgrade order for filer labels. A single task's executors are its jobs with both labels taskmaster-name=<task> and job-type=executor (before: taskmaster-name only). Taskmasters of tesk-core releases with tesk-core#147 (0.12.0 and later) also give the filers' jobs the label taskmaster-name. Upgrade TESK API to this release first, and set the taskmaster to such a release (TESK_API_TASKMASTER_IMAGE_VERSION, see Configuration) only once no older replica of TESK API serves requests: in a second deployment after the rollout has finished, or in the same one with the Recreate strategy. An older TESK API with such a taskmaster takes the inputs filer's job for the outputs filer's job on GET /tasks/{id} and POST /tasks/{id}:cancel: a task whose taskmaster stopped before the outputs filer after an ignored executor failure is COMPLETE instead of SYSTEM_ERROR, and a task whose inputs filer failed is SYSTEM_ERROR while its taskmaster still runs. GET /tasks isn't affected. With older taskmasters, nothing changes.
  • TES 1.1 fields. outputs[].path_prefix, inputs[].streamable, executors[].ignore_error and resources.backend_parameters_strict are accepted instead of being refused as unknown fields, with one exception that is refused with 400 Bad Request, as TESK can't do what it asks: backend_parameters_strict: true with backend_parameters (see TES 1.1 fields).
  • ignore_error. executors[].ignore_error: true is accepted rather than refused with 400 Bad Request (see TES 1.1 fields). It needs a taskmaster that goes on after such an executor fails (tesk-core#142): set the taskmaster image to such a release (TESK_API_TASKMASTER_IMAGE_VERSION, see Configuration) once this TESK API runs, not before (see "Upgrade order for filer labels" above, as such a release may also label the filers' jobs). An older taskmaster stops at the failure: the task then ends SYSTEM_ERROR, unless the failed executor was the last one and the task has no outputs, which completes as asked.
  • Wildcards without path_prefix. An output whose path has wildcards (*, ?, [) but no path_prefix is refused with 400 Bad Request, unless its url is a file: URL or has no scheme, as TES 1.1 requires path_prefix for such outputs (see TES 1.1 fields). Before, such a task ran, and its output then failed or uploaded nothing useful. Clients that send such outputs to other URLs set path_prefix, e.g. to the part of path before its first wildcard. Uploading the matches of a pattern needs a taskmaster whose filer supports path_prefix (tesk-core#134).
  • Output file logs. logs[0].outputs lists the uploaded files (see Output file logs) once the taskmaster and the filer are of a tesk-core release with tesk-core#144 (set TESK_API_TASKMASTER_IMAGE_VERSION and TESK_API_TASKMASTER_FILER_IMAGE_VERSION to it, if the default isn't such a release). With older images, it stays empty, as before. TESK API needs no new permissions. The taskmaster needs patch on jobs and get on pods/log (see Deployment): TESK's Helm chart grants both; if you manage the taskmaster's role yourself, check that it has them, or the array stays empty. GET /tasks reads only the filers' jobs of the page's tasks, by the label taskmaster-name of taskmasters of tesk-core 0.12.0 and later; while a task of the page has inputs, outputs or volumes but no labelled filer job (e.g. one started by an older taskmaster), it also reads the unlabelled filers' jobs of the namespace, in one more request (see Output file logs). Deleting the tasks of older taskmasters (e.g. with the taskmaster's TTL) makes that request return nothing.
  • Default page size. GET /tasks without page_size returns at most 256 tasks per page, as TES specifies, with a next_page_token if there are more (see Listing tasks). Before, it returned all tasks at once. Clients that don't pass page_size must follow next_page_token, or pass a page_size of up to 2048.
  • CANCELING and PREEMPTED. A cancelled task is CANCELING while a pod of its taskmaster, executors or outputs filer is still running, and CANCELED only once they have ended; a task whose failed executors were all disrupted by Kubernetes (preemption, eviction, node pressure, taints) is PREEMPTED instead of EXECUTOR_ERROR (see Getting tasks). Clients that wait for CANCELED after a cancel request wait until the pods have ended; clients that know only the states of TES 1.0 must accept the new ones.
  • backend_parameters. They are no longer stored or returned, also for tasks created by earlier versions; with the view FULL, a task lists the keys it ignored in logs[0].system_logs (only tasks created by 2.0.0 or later: earlier versions recorded no ignored keys, so their tasks list none). Service info lists tesResources_backend_parameters (always []); keep it at [] in your own service info file, if you use one.
  • Service info. type.version is 1.1.0 instead of 1.0.0. If you use your own file (TESK_API_SERVICE_INFO_LOCATION), update type.version and version there, too.
  • Inputs without a source. An input with neither a url (that isn't blank) nor a content (that isn't empty) is still refused with 400 Bad Request, but the message now names the check: Field 'inputs[0].urlOrContentGiven' URL or content required instead of Field 'inputs[0]' URL or content required. The messages are meant for people; clients should rely on the status code, not on their text.
  • Token validation. TESK API validates access tokens with the resource server of Spring Security instead of Spring Security OAuth, which is end of life. Deployments need no change if SECURITY_OAUTH2_RESOURCE_USER_INFO_URI is an absolute http or https URL: it keeps its name and meaning. TESK API reads none of the other security.oauth2.* settings of Spring Security OAuth (e.g. security.oauth2.resource.token-info-uri), which it never documented. Clients may notice (see Token validation):
    • The token is taken from the Authorization: Bearer header only; an access_token parameter in the URL or in a form is ignored, so such requests get 401 Unauthorized. Send the token in the header.
    • For an invalid token, error_description and message of the 401 say Invalid access token instead of repeating the token.
    • A header with an empty token, or with characters that tokens can't have (e.g. spaces), is refused with 401 (invalid_token, Bearer token is malformed) without a call to the user info endpoint. Before, it was passed on to the endpoint.
    • A token whose user info has no sub (or a blank one) is refused with 401 instead of failing with 500 Internal Server Error.
    • Without a valid token, a request that accepts no JSON (e.g. Accept: text/plain) gets 401 with the WWW-Authenticate header and no body.
    • A user whose groups claim is null has no group authorities; before, they had one named null.
  • User info endpoint. TESK API waits at most 10 seconds to connect to the user info endpoint and 30 seconds for each read of its answer, and then refuses the token (before, it waited without limit). It doesn't start if SECURITY_OAUTH2_RESOURCE_USER_INFO_URI isn't an absolute http or https URL with a host; before, it started and refused every token.
  • Kubernetes client. TESK API has version 28 of the Kubernetes Java client instead of 11 (see Deployment), and SnakeYAML 2 instead of 1.33. Nothing changes for deployments: it needs the same rights, and works with the same Kubernetes versions. The jobs, ConfigMaps and Secrets that it creates list empty fields (e.g. args: []), which Kubernetes treats as unset; the taskmaster's input stays as it was. Run outside a cluster with a token in its kubeconfig file (e.g. after oc login; not with client certificates), TESK API can now cancel tasks: it sent the token without its Bearer prefix in the patches, which Kubernetes refused. A task whose taskmaster job has no creation time has no creation_time, instead of the current time; Kubernetes sets it for every job, so this only matters for tests.
  • Tasks that can't be serialized. If TESK API can't write a task as JSON for its taskmaster, creating the task fails with 500 Internal Server Error; before, it logged the error and created a job without the task's JSON, which could neither run nor be read back. This doesn't happen with valid TES tasks.

New, off until you use them:

  • tokens of allow-listed service clients (TESK_API_AUTHORISATION_SERVICE_CLIENTS_*, see Tokens of services; in the Helm chart of TESK after 0.3.0: auth.tokenClients);
  • CORS for browser clients of the origins listed in TESK_API_CORS_ALLOWED_ORIGINS (see Cross-origin requests); list only origins that you trust with your users' tokens;
  • private executor images, an experimental workaround that needs create and delete on secrets (see Private executor images and Deployment).

To 1.2.0

From 1.1.0, deployments may have to change their configuration, the rights of TESK API in Kubernetes and the order of the upgrade, and clients may notice changed answers: read all of the items below before you upgrade. What's new:

  • Creator labels. New tasks record their creator in the label creator-user-hash (a hash of the user's sub) and the annotation creator-user-id (the sub itself) instead of the label creator-user-id (the sub with @ replaced by _), so that any sub works, also one longer than 63 characters or with characters that labels don't allow, and different IDs are told apart (see Task creators). logs[0].metadata.USER_ID shows the sub unchanged (e.g. user@example.org instead of user_example.org). Tasks created before the upgrade keep the old label: team admins and super admins see them as before (until 2.1.0, see To 2.1.0 for owner-only visibility), but their creators can no longer list, get or cancel them. What to do:

    • Upgrade when no tasks run, or let running tasks end first; if you want their creators to keep access for a while, set TESK_API_AUTHORISATION_LEGACY_USER_LABELS=true (in the Helm chart of TESK: auth.legacyUserLabels, from chart 0.3.0). Turn it off again once the old tasks are no longer needed (e.g. after the taskmaster's TASK_TTL_SECONDS).
    • List the old tasks with kubectl get jobs -n <namespace> -l 'job-type=taskmaster,creator-user-id,!creator-user-hash'. The old label can't be converted exactly, because its value doesn't tell whether a _ was an @. (Kubernetes can't select by annotations: an object that also has the annotation creator-user-id shows up here too, but TESK API doesn't count it as old.) Delete the old tasks that are no longer needed by name (kubectl delete jobs -n <namespace> <name>). kubectl delete jobs -n <namespace> -l 'creator-user-id,!creator-user-hash' deletes all old tasks at once, running ones included, with their executors' jobs, which carry the same label; kubectl delete configmaps -n <namespace> -l 'creator-user-id,!creator-user-hash' deletes their ConfigMaps (see "Deleted tasks" below).
    • With several replicas of TESK API, a rolling update runs old and new replicas side by side for a while: each one doesn't match the tasks created by the other to their creators, so creators can get 403 Forbidden for their newest tasks until the update completes. Update with the Recreate strategy to avoid that, or accept the short window.
    • The taskmaster (tesk-core) doesn't read these labels: it copies the executors' jobs, with their labels and annotations, as TESK API prepares them, so it needs no change.
    • An older TESK API (e.g. after a rollback) doesn't match tasks created by this one to their creators, as it doesn't know the new label.
  • Task states from all jobs. The state of a task comes from all its jobs (see Getting tasks). An executor's job that failed, whichever executor it is, gives EXECUTOR_ERROR, also with the job condition FailureTarget (Kubernetes 1.31 and later). A task is COMPLETE only if the jobs of all its executors completed; if one is missing, the task is SYSTEM_ERROR. Before, the state came from the last executor job that existed, so that a task whose last executor's job was deleted could be COMPLETE.

  • Executors aren't retried. Executor jobs get backoffLimit: 0 (before: Kubernetes' default of 6 retries), unless the taskmaster's environment sets EXECUTOR_BACKOFF_LIMIT. TESK's Helm chart sets it from tesk.executorRetries (2 by default), so chart deployments keep that limit; set it to 0 for single runs.

  • Cancelling ended tasks. POST /tasks/{id}:cancel reads all jobs of the task, as GET does, so a task whose executor failed while the taskmaster still runs can't be cancelled any more (400 Bad Request).

  • Upgrade order. Upgrade TESK API first, then the taskmaster (tesk-core) to v0.11.0 or later, which keeps failed jobs (see tesk-core#98). The Helm chart of TESK upgrades both at once (from chart 0.3.0, which sets both versions); tasks running during the upgrade still keep the taskmaster they were started with. While only one of them is upgraded:

    • This TESK API with an older taskmaster reports a task whose last executor's job the taskmaster deleted (because its pod couldn't pull its image) as SYSTEM_ERROR, instead of COMPLETE.
    • An older TESK API with the newer taskmaster reports a failed executor as EXECUTOR_ERROR. For a few seconds after Kubernetes sets FailureTarget, before it counts the failed pod, the older TESK API can report QUEUED or SYSTEM_ERROR; clients that take SYSTEM_ERROR as final keep it.
  • Output file logs. With the views BASIC and FULL, a task's logs[0].outputs is an empty array ([]), as the TES specification requires the field; before, it was left out. TESK API still doesn't list the uploaded files (see Output file logs). logs sent with a new task are ignored. Before, they came back in front of TESK's own log: BASIC and FULL showed them as logs[0], the access check of GET /tasks/{id} read the user and group from them (so the creator of a task could show it to other users or hide it from the managers of its group), and a task whose sent log had no metadata failed with 500.

  • Filtering tasks by name. GET /tasks supports name_prefix (see Listing tasks); before, it was ignored. Pages can be shorter than page_size, even empty, with a next_page_token.

  • Paging parameters checked. GET /tasks refuses a page_size below 1 or above 2048 with 400 Bad Request (see Listing tasks); before, any number was accepted, and numbers beyond the range of an int wrapped around. An expired or malformed page_token is refused with 400 Bad Request instead of 500 Internal Server Error, with a message that names the parameter but not its value. Clients that page with more than 2048 tasks need to lower page_size. A request parameter of the wrong type (e.g. page_size=abc) is refused, as before, with 400 Bad Request, but its message now names the parameter instead of repeating the value.

  • Task cancellation response. POST /tasks/{id}:cancel answers a successful cancellation with an empty JSON object ({}, Content-Type: application/json), as the TES specification defines, instead of an empty body. Clients that checked for an empty body need to accept {}.

  • Decimal CPU cores. resources.cpu_cores accepts decimal numbers with up to 3 decimals, e.g. 0.5, up to 999999.999 (see API). Before, the decimal part was dropped silently, so that 0.5 set no CPU at all (0). Whole numbers up to 999999 work as before; numbers with more digits or decimals are refused with 400 Bad Request. The API description (/v2/api-docs) now gives cpu_cores as a number instead of an integer.

  • Positive resources (behaviour change). resources.cpu_cores, ram_gb and disk_gb must be positive, and ram_gb at least 0.000001: 0, negative and smaller numbers are refused with 400 Bad Request (see API). Before, TESK API didn't check them and passed them on to Kubernetes and the taskmaster. A task with 0 for any of them, which was accepted before, is now refused: clients that send 0 for "no requirement" need to leave the field out instead.

  • New tasks are queued. Right after it was created, until Kubernetes has created the pod of its taskmaster's job, a task is QUEUED; before, it was SYSTEM_ERROR for that time, so that clients that polled a new task at once could take it for failed (see Getting tasks). In one test on minikube, with 50 tasks created at once, this took about 4.5 seconds. A task whose taskmaster pod Kubernetes can't create (e.g. a used-up ResourceQuota, or a pod that an admission policy refuses) is QUEUED too now, instead of SYSTEM_ERROR, until the cause goes away or someone deletes the job: if you alert on SYSTEM_ERROR for such problems, watch the jobs' FailedCreate events instead.

  • Cancelling tasks that haven't started. A task whose taskmaster isn't running yet (its pod is pending, or its job has no pod yet) can be cancelled: TESK API labels the job (and a pending pod) as cancelled and sets the job's parallelism to 0 and activeDeadlineSeconds to 1, so that Kubernetes removes its pods and fails the job (see Cancelling a task; this uses patch on jobs, which TESK API already needs). Before, a task with a pending pod was reported CANCELED, but its taskmaster started later all the same; a new task without a pod couldn't be cancelled (400 Bad Request). A taskmaster whose container is starting at the very moment of the request could still start until Kubernetes stops it (tesk-core#132).

  • Jobs without labels. GET /tasks/{id} and POST /tasks/{id}:cancel (the requests that read a single task) answer 404 Not Found for the name of a job without labels in the namespace, as for any job that isn't a taskmaster's job; before, they answered 500 Internal Server Error.

  • RAM under any locale. Tasks with resources.ram_gb are created also when the JVM's default locale writes numbers with a decimal comma (e.g. de_DE); before, creating them failed.

  • Kubernetes client logs. KubernetesClientWrapper logs at INFO, like the rest of TESK API, so the calls of its Kubernetes client are no longer logged; before, it was set to TRACE, which logged its calls with their arguments and the objects it created or labelled (the tasks' Kubernetes objects, e.g. commands and environment variables). To log them again, for debugging, set LOGGING_LEVEL_UK_AC_EBI_TSC_TESK_K8S_SERVICE=TRACE (Spring Boot lowercases logger names from environment variables, so name the package, not the class).

  • Authorisation without groups. With the auth profile, TESK API can authorise users by a claim of the user info instead of group membership (TESK_API_AUTHORISATION_CLAIM_ENABLED, TESK_API_AUTHORISATION_CLAIM_NAME and TESK_API_AUTHORISATION_CLAIM_VALUES; see Authorisation without groups). It is off by default, so nothing changes unless you turn it on; read its security implications first. The Helm chart of TESK sets them with auth.claim (enabled, name and values; from chart 0.3.0).

  • Group names matched literally. When TESK API recognises team and team admin groups, it compares the group settings (TESK_API_AUTHORISATION_GROUP_PREFIX, …_PARENT_GROUP, …_ENV_SUBGROUP, …_BASE_GROUP, …_DELIMITER, …_ADMIN_SUBGROUP and …_GROUP_SUFFIX) as plain text (see Access control). Before, they were used as regular expressions, so that characters such as the . in the default prefix and suffix matched any character. With plain group names, as in the defaults, nothing changes. If a setting relied on a pattern (e.g. (A|B) or .*), it no longer matches: set the exact names instead.

  • Non-root image. The image runs as the user tesk (UID 1000, group 0) instead of root, with the home directory /home/tesk (see Deployment). The Helm chart of TESK already runs it as UID 1000 when its security context is enabled (tesk.securityContext, the default). If you run the image yourself with a kubeconfig file, mount it to /home/tesk/.kube/config instead of /root/.kube/config (or set KUBECONFIG), and run it with your own UID in group 0 (--user "$(id -u):0") if only your user may read the file; if you mount other files, make sure that the container's user or group 0 can read them.

  • Deleted tasks. The taskmaster's job owns the task's ConfigMap, so that Kubernetes deletes the ConfigMap with the job, e.g. after the TTL that the taskmaster can set (TASK_TTL_SECONDS of tesk-core). TESK API now checks the ConfigMap in a dry run, then creates the job and the ConfigMap right after it; the job's pod waits for the ConfigMap. If the ConfigMap can't be created after all, TESK API deletes the job. It therefore needs two more rights (see Deployment), which TESK's Helm chart and Kubernetes' edit role already grant: delete on jobs, and delete on configmaps where the admission plugin OwnerReferencesPermissionEnforcement is on (e.g. on OpenShift). If you give TESK API its own role, add them before you upgrade: without delete on configmaps there, no task can be created (the request fails before the job is created); without delete on jobs, a job whose ConfigMap failed stays behind (see Failures when creating a task). Tasks whose job Kubernetes is deleting (it has a deletion timestamp) are gone: GET /tasks/{id} answers 404 Not Found and GET /tasks leaves them out (see Deleting tasks); before, they could show up as SYSTEM_ERROR until Kubernetes removed the job. ConfigMaps of tasks created before the upgrade have no owner and stay until you delete them (e.g. those whose taskmaster's job no longer exists).

  • Swagger UI off by default. TESK API no longer serves the Swagger UI and its static resources and configuration (/swagger-resources) unless TESK_API_SWAGGER_UI_ENABLED is true; the root path (/) then redirects to it as before. While it is off, these paths and / answer 404 Not Found. The API description (/v2/api-docs) is served either way. If you or your users rely on the Swagger UI, e.g. for its built-in OpenID Connect client, set the variable in your deployment (see API); the Helm chart of TESK sets it with tesk.swaggerUi.enabled (from chart 0.3.0). Turning it on serves the Swagger UI and its static resources publicly, also with the auth profile: turn it on only where it is needed.

  • Swagger UI client secret. The Swagger UI is a public client: TESK API no longer passes it a client secret (in /swagger-resources), and TESK_API_SWAGGER_OAUTH_CLIENT_SECRET is deprecated and ignored; TESK API logs a warning at startup if it is set. Remove the setting, and register the Swagger UI's client at your identity provider as a public client (implicit grant, the default, or authorisation code without a secret; the latter needs an identity provider that allows it for public clients without PKCE). If a client secret was configured while the Swagger UI was on (always the case before 1.2.0, with the auth profile), rotate that secret at your identity provider.

  • Service info setting. TESK_API_SERVICE_INFO_PUBLIC (true by default) keeps GET and HEAD /service-info public with the auth profile, as before; set it to false to require a valid token for them (see Configuration). The Helm chart of TESK sets it with auth.serviceInfoPublic (from chart 0.3.0), which needs TESK API 1.2.0 or later.

  • TES version in service info. The built-in service-info.yaml reports the type version as "1.0.0" instead of "1.0". If you use your own file, quote its type.version (e.g. version: '1.0.0'): unquoted, YAML reads values like 1.0 as numbers.

  • Image. The image is built from source on Eclipse Temurin 8 (Ubuntu) instead of the discontinued openjdk:8-jdk-alpine. Releases are published as elixircloud/tesk-api:X.Y.Z (and latest), signed with Sigstore and scanned before they are published; see Deployment. If you mount files into the container or run it with a fixed user ID, check that these still fit the new base image.

  • Taskmaster and filer images. Without other settings, TESK API runs the taskmaster docker.io/elixircloud/tesk-core-taskmaster:0.11.0 and the filer docker.io/elixircloud/tesk-core-filer:0.11.0, the images that tesk-core publishes, instead of eu.gcr.io/tes-wes/taskmaster:v0.10.0 and eu.gcr.io/tes-wes/filer:v0.10.0 (see Configuration). The Helm chart of TESK sets its own.

  • Service info version. The built-in service-info.yaml reports version 1.2.0. If you use your own file (TESK_API_SERVICE_INFO_LOCATION), update its version yourself.

Pre-releases (e.g. 1.2.0rc1) are published under their own tag only and never as latest.