Repository navigation
build: use tesk-api 2.0.0 in the chart - #309
Conversation
The chart's appVersion (the default tag of the API's image) is 2.0.0, and the taskmaster and filer images default to 0.12.0. One helm upgrade brings both in the order they need, as the API's Deployment uses the Recreate strategy (#305). The notes warn about auth.tokenClients for tesk-api before 2.0.0, the first release with the setting (was: before 1.2.1-0). The chart's service info reports TES 1.1.0 for tesk-api 2.0.0 and later (and for tags that aren't versions), and TES 1.0.0 before, as tesk-api 2.0.0 implements TES 1.1. Refs #308 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pull the docs of tesk-api v2.0.0 and tesk-core v0.12.0 into the site, so that the links of the tesk-api 2.0.0 release notes (upgrading/#to-200, "Tokens of services") resolve. Add upgrade notes for the new default images: pinned tags and the upgrade order, the hardened filer pods on clusters that refuse the RuntimeDefault seccomp profile, the service info's TES version, and the API changes for clients. The configuration reference and the deployment guide name the new defaults. Refs #308 Co-Authored-By: Claude Opus 5.5 <[email protected]>
tesk.apiBefore replaces four copies of the version check of the API's tag (notes and service info). Docs: /v3/api-docs of tesk-api 2.0.0, the tokenClients requirement in the configuration reference, one place for the filer's seccomp advice; test_default_images checks the rendered image. Refs #308 Co-Authored-By: Claude Opus 5.5 <[email protected]>
- tesk.filer.podSecurityContext and tesk.filer.securityContext replace the taskmaster's defaults for the filer pods (FILER_POD_SECURITY_CONTEXT and FILER_SECURITY_CONTEXT), e.g. on clusters that refuse pods asking for the RuntimeDefault seccomp profile; null keeps the defaults. - The FTP secret's name also goes to the taskmasters as TESK_FTP_SECRET_NAME, so that filer jobs of taskmaster 0.12.0 reference it instead of holding the credentials. - The notes warn about taskmaster 0.12.0 or later with tesk-api before 2.0.0, which reports wrong task states. Docs: upgrade notes, configuration reference, deployment guide. Refs #308 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add pre-release cases to the notes test for taskmaster 0.12.0 with an older tesk-api, parametrize the filer security context test on JSON values, and read tesk.apiBefore the same way everywhere. Docs: rewrap lines, note that Helm merges the filer's security contexts across values files, and the ignore_error exception with taskmaster 0.11.0. Refs #308 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideImplementationAdd shared SemVer-aware API-version checks, use them for the existing compatibility warnings and service-info TES version, and reject taskmaster versions that require a newer API.
ConfigurationSet the chart's API version and default taskmaster and filer releases to the compatible 2.0.0 and 0.12.0 combination, and define the filer security-context values.
Pass the FTP secret name and optional filer security contexts to the taskmaster environment.
Update the values schema to validate the new filer security-context settings.
Pin the tesk-api and tesk-core documentation sources to the releases covered by this chart update.
DocumentationDocument the new defaults, upgrade sequencing and compatibility checks, filer security contexts, FTP secret reference, TES service-info version, and API changes.
Update the configuration and deployment references for the new image versions, filer settings, token-client requirement, and API documentation endpoint.
Explain that tesk-api 2.0.0 serves OpenAPI 3.1 at
TestsCover the new image defaults, API-version-dependent service info and warnings, taskmaster/API incompatibility, FTP secret propagation, and filer security-context rendering and validation.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #309 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 422 422
=========================================
Hits 422 422 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Linked issuesChecked at commit 6225b88 #308 build: use tesk-api 2.0.0 in the chart · 7 of 8 met
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="charts/tesk/templates/_helpers.tpl" line_range="104" />
<code_context>
+`version` (X.Y.Z) */ -}}
+{{- define "tesk.apiBefore" -}}
+{{- $apiTag := include "tesk.apiImageTag" .root | trimPrefix "v" -}}
+{{- if and (regexMatch "^[0-9]+\\.[0-9]+(\\.[0-9]+)?([-+][0-9A-Za-z.+-]*)?$" $apiTag) (semverCompare (printf "<%s-0" .version) $apiTag) -}}
+true
+{{- end -}}
</code_context>
<issue_to_address>
**Malformed tags stop chart rendering**
When an API or taskmaster image tag is version-shaped but has invalid SemVer syntax, such as `1.2.3-`, `0.12.0+` or `0.12.0-foo..bar`, and the chart renders its built-in service info, `regexMatch` accepts these tags, so `semverCompare` receives them and errors; Helm fails to render the chart instead of treating the tags as unchecked.
Tighten the regex or otherwise validate the tag before calling `semverCompare`.
Also at `charts/tesk/templates/_helpers.tpl:386`.
</issue_to_address>
### Comment 2
<location path="charts/tesk/templates/common/tesk-deployment.yaml" line_range="133" />
<code_context>
+ "podSecurityContext" "TESK_API_TASKMASTER_ENVIRONMENT_FILER_POD_SECURITY_CONTEXT"
+ "securityContext" "TESK_API_TASKMASTER_ENVIRONMENT_FILER_SECURITY_CONTEXT" }}
+ {{- $context := get $filer $key }}
+ {{- if kindIs "map" $context }}
+ - name: {{ $variable }}
+ value: {{ toJson $context | quote }}
</code_context>
<issue_to_address>
**Invalid filer contexts reach task creation**
When a `tesk.filer.podSecurityContext` or `tesk.filer.securityContext` map contains an invalid field or value, the chart accepts any map and passes it through as JSON, so a typo or invalid field type reaches the taskmaster instead of failing validation during installation; filer pods then fail to be created and tasks with inputs fail.
Validate the supported Kubernetes context fields and value types in the chart schema, or document that validation is deferred to task submission.
</issue_to_address>
Sourcery assessment
Needs a human reviewer. 2 findings to address first, and the chart now rolls deployments onto new API and taskmaster/filer versions, changing task execution and filer security behavior; a regression could leave incorrect task states or failed task outputs that remain after rollback. Reverting restores the old images, but affected tasks may need to be rerun.
Blocking findings: charts/tesk/templates/_helpers.tpl:104, charts/tesk/templates/common/tesk-deployment.yaml:133
Tags that look like versions but aren't SemVer (e.g. 1.2.3- or 0.12.0-foo..bar) made semverCompare fail the render. The API and taskmaster checks now accept only SemVer pre-release and build parts, and treat other tags as tags that aren't versions. Docs: the taskmaster checks the filer's security contexts and falls back to its defaults. Refs #308 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Taskmaster 0.12.0 and later with tesk-api before 2.0.0 report wrong task states, e.g. after an upgrade with values that pin an older tesk.image.tag but not the taskmaster. The installation now fails for such a pair instead of the notes warning about it. The version checks accept only SemVer that semverCompare reads as written (no leading zeros in numbers and numeric pre-release parts), so tags such as 01.2.3 or 1.2.3-01 count as tags that aren't versions. Refs #308 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #308
Summary
tesk-api 2.0.0 (release, image
docker.io/elixircloud/tesk-api:2.0.0) and tesk-core 0.12.0 (release, taskmaster and filer images0.12.0) are out; this makes them the chart's defaults and adapts the chart to them.appVersion(the default tag of the API's image)2.0.0;tesk.taskmaster.image.tagandtesk.filer.image.tag0.12.0.Recreateby default (feat: set the API's update strategy (Recreate) #305/feat: set the API's update strategy #306), so onehelm upgradethat brings both is safe. The two-step path forRollingUpdateis documented, now with what happens between the steps. New: the chart refuses a taskmaster 0.12.0 or later with tesk-api before 2.0.0 (e.g. values that pintesk.image.tagbut not the taskmaster);helm install/upgradefails with an error that names the tags to set and links the upgrade notes. The version checks accept only SemVer thatsemverComparereads as written (helperstesk.semver,tesk.checkApiTaskmaster).auth.tokenClientswarning applies to tesk-api before 2.0.0 (<2.0.0-0; was<1.2.1-0); 2.0.0 pre-releases count as supporting it. All four version gates of the API now use one helper,tesk.apiBefore.type.versionis1.1.0for tesk-api 2.0.0 and later (and tags that aren't versions, e.g.dev),1.0.0before.RuntimeDefaultseccomp, non-root, read-only root filesystem. New valuestesk.filer.podSecurityContextandtesk.filer.securityContext(default null = taskmaster's defaults; a map replaces them;{}leaves one out) go to the taskmaster asFILER_POD_SECURITY_CONTEXT/FILER_SECURITY_CONTEXT, for clusters that refuseRuntimeDefault(e.g. Rahti).TESK_FTP_SECRET_NAME, so filer jobs of taskmaster 0.12.0 reference the secret instead of holding the credentials as values.docs-sources.ymlpins tesk-apiv2.0.0(9d73a31) and tesk-corev0.12.0(b78d5c9), so the links of the tesk-api release notes (tesk-api/upgrading/#to-200) and "Tokens of services" resolve on tesk.readthedocs.io.serviceInfo.existingConfigMap, client-visible API changes), configuration reference, deployment guide (seccomp section, token clients,/v3/api-docs), API page.docs/development.md, the release-prep PR sets it.How it was verified
helm lint charts/tesk --strict(Helm 3.22.1): passed.REQUIRE_HELM=1 pytest tests/test_chart.py: 691 passed. Tests were written first and failed before each change (new:test_default_images,test_service_info_type_version,test_filer_security_contexts(_invalid),test_new_taskmaster_old_api,test_malformed_version_tags; extended:test_notes_token_clients_old_api,test_ftp_secret_credentials).coverage run -m pytest --ignore=tests/test_chart.py: 175 passed, 100% coverage.pre-commit run --all-files: passed.mkdocs build --strict: passed with the new pins; the anchorstesk-api/upgrading/#to-200,tesk-api/access-control/#tokens-of-services,tesk-core/upgrading/#0120,#hardened-filer-pods,#ftp-credentials-by-referenceandtesk-core/filer/#pod-securityexist in the built site.origin/dev(tesk-api 1.2.0, tesk-core 0.11.0), then upgraded to this branch in onehelm upgrade: strategy{"type":"Recreate"}, imagetesk-api:2.0.0, taskmaster/filer0.12.0, service info{"type":{"group":"org.ga4gh","artifact":"tes","version":"1.1.0"},"version":"2.0.0"};tests/smoke/deployment.shpassed (task COMPLETE, cancel CANCELED); a task with a content input ran the hardened 0.12.0 filer (runAsNonRoot,RuntimeDefault) to COMPLETE, and its filer job carriedtaskmaster-name;tesk.filer.podSecurityContext={"runAsNonRoot":true}: the filer pod ran with exactly that security context (no seccomp profile) and the task completed.01.2.3,1.2.3-01) count as tags that aren't versions (6225b88). Answered: the notes no longer warn about that pair because the chart refuses it (the build: use tesk-api 2.0.0 in the chart #308 checklist says so now). Also fixed: malformed version-like tags (e.g.1.2.3-) failedsemverCompare; the checks now accept only SemVer suffixes (c492e63,test_malformed_version_tags). Declined: validating the filer security contexts field by field in the schema (would duplicate the Kubernetes API schema; the taskmaster validates them and falls back to its defaults, now documented).Declined review findings
Two review rounds (adversarial and quality). All high and medium findings were fixed: values for the filer's security contexts, the warning for a new taskmaster with an old API, the FTP secret by reference, the version helper, and the test and docs fixes. Declined:
tesk.filer.*SecurityContextacross values layers ({}in an override file doesn't clear a map from a base file): this is how Helm treats every map. It is documented rather than handled with a sentinel value, which would add a schema special case.1,2) andV1.2.0count as "newer", as in the existing checks.Open questions
None.
🤖 Generated with Claude Code