Repository navigation
feat(chart): add tesk.filerHttpTimeout - #260
Conversation
Pass the filer's HTTP(S) timeout (FILER_HTTP_TIMEOUT, tesk-core #101) to the taskmaster when set; the schema accepts positive numbers only. Closes #259 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Accept timeouts up to 1000000 seconds, as the filer does, and test numbers from values files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideConfigurationDefine the timeout value and validate its supported range, then render it as the taskmaster environment variable only when configured.
Warn users when the timeout is configured with taskmaster or filer images that do not support it.
DocumentationDocument the new timeout's default, accepted values, image compatibility, and upgrade implications.
TestsTest environment-variable rendering and omission, schema validation, values-file parsing, and warnings for unsupported image versions.
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 #260 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 229 229
=========================================
Hits 229 229 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="charts/tesk/templates/common/tesk-deployment.yaml" line_range="78-79" />
<code_context>
value: {{ index $values "tesk.filerRetries" | quote }}
+ {{- /* Optional: unset or empty leaves the filer's default */}}
+ {{- with $tesk.filerHttpTimeout }}
+ - name: TESK_API_TASKMASTER_ENVIRONMENT_FILER_HTTP_TIMEOUT
+ value: {{ toString . | quote }}
+ {{- end }}
- name: SERVER_SERVLET_CONTEXT_PATH
</code_context>
<issue_to_address>
**Timeout is ignored by default images**
When a user sets `tesk.filerHttpTimeout` without changing the default taskmaster and filer image tags, the template injects the environment variable, but taskmaster and filer images at v0.10.6 predate support and ignore it, so HTTP(S) staging retains the old unbounded wait and the requested timeout never applies.
Warn or fail when a non-empty timeout is set with either image tag at or below v0.10.6, or update the default image tags to versions that support it.
</issue_to_address>
### Comment 2
<location path="docs/configuration.md" line_range="48" />
<code_context>
+| `tesk.filerHttpTimeout` | empty | Timeout of the filer's HTTP(S) requests, in seconds, a positive number up to 1000000 (strings as plain decimals, e.g. `"600"`): for connecting and for each read, not for the whole transfer. Empty uses the filer's default, 300 seconds. Takes effect with taskmaster and filer images newer than v0.10.6 (see [Filer](tesk-core/filer.md#https)). |
</code_context>
<issue_to_address>
**Filer documentation link is broken**
When the site is built before `docs-sources.yml` is updated to a tesk-core commit containing `filer.md`, the rendered link points to `tesk-core/filer.md#https`, but the site pulls tesk-core pages from the commit pinned in `docs-sources.yml`; that commit does not include the new filer documentation, so readers land on a missing page.
Update the tesk-core docs pin to a commit containing `filer.md#https` when adding this link.
</issue_to_address>
### Comment 3
<location path="tests/test_chart.py" line_range="1100" />
<code_context>
+ """
+ variables = env(render(*args))
+ key = "TESK_API_TASKMASTER_ENVIRONMENT_FILER_HTTP_TIMEOUT"
+ assert variables.get(key) == expected
+
+
</code_context>
<issue_to_address>
**Unset timeout variable goes unnoticed**
When the template renders the timeout environment entry without a `value` when the setting is unset, empty, or null, `test_filer_http_timeout` compares `variables.get(key)` with `None`, so an environment entry with no `value` also passes for the unset, empty, and null cases; the test misses that the variable was rendered instead of omitted.
For expected `None`, assert `key not in variables`; otherwise assert the value equals `expected`.
</issue_to_address>Linked issues
#259 Add a chart value for the filer's HTTP timeout · 3 of 3 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Render tesk.filerHttpTimeout as the taskmaster environment variable when set; omit it when empty or null. |
✅ Met | The template conditionally emits the variable, and tests cover set, empty, and null values. |
| 2 | Accept positive numbers only; reject zero, negative, and non-numeric values. | ✅ Met | The schema enforces a value greater than zero and at most 1,000,000; tests cover invalid values. |
| 3 | Document the value in the configuration reference and upgrade notes, including the image versions it takes effect with. | ✅ Met | The configuration reference describes the setting and the upgrade notes specify taskmaster and filer images newer than v0.10.6. |
Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: charts/tesk/templates/common/tesk-deployment.yaml:79, tests/test_chart.py:1100
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/common/tesk-deployment.yaml" line_range="78" />
<code_context>
value: {{ index $values "tesk.filerRetries" | quote }}
+ {{- /* Optional: unset or empty leaves the filer's default */}}
+ {{- with $tesk.filerHttpTimeout }}
+ - name: TESK_API_TASKMASTER_ENVIRONMENT_FILER_HTTP_TIMEOUT
+ value: {{ toString . | quote }}
+ {{- end }}
</code_context>
<issue_to_address>
**Configured timeout is ignored**
When a user sets `tesk.filerHttpTimeout` while either image is v0.10.6 or older, the chart renders `TESK_API_TASKMASTER_ENVIRONMENT_FILER_HTTP_TIMEOUT`, but those images do not support passing or applying it, so requests keep the old timeout and the user receives no warning.
Check the taskmaster and filer image versions and warn or reject the configuration when either image does not support the timeout.
Also at `charts/tesk/templates/common/tesk-deployment.yaml:79`.
</issue_to_address>
### Comment 2
<location path="tests/test_chart.py" line_range="1101" />
<code_context>
+ # for each read (not the whole transfer); empty uses the filer's default
+ # (300). Takes effect with taskmaster and filer images newer than v0.10.6
+ filerHttpTimeout: ""
# Resources of the API's container
resources:
</code_context>
<issue_to_address>
**Unset timeout variable remains rendered**
When the rendered environment contains the timeout key with a null value for an unset, empty, or null setting, the template emits the timeout environment entry with `value: null` for an unset, empty, or null setting, `test_filer_http_timeout` line 1100 compares `variables.get(key)` with `None`, so the assertion passes although the variable was not omitted.
For cases expecting omission, assert that `key` is not in `variables`.
</issue_to_address>Linked issues
#259 Add a chart value for the filer's HTTP timeout · 3 of 3 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Render tesk.filerHttpTimeout as the filer timeout environment variable when set, and omit it when empty or null. |
✅ Met | The deployment template renders TESK_API_TASKMASTER_ENVIRONMENT_FILER_HTTP_TIMEOUT only when the value is set; tests cover unset, empty, null, numeric, and string values. |
| 2 | Accept positive timeout numbers only. | ✅ Met | The schema requires values above zero, caps them at 1,000,000, and restricts strings to the documented decimal format; tests cover zero, negative, non-numeric, and out-of-range values. |
| 3 | Test rendering and schema validation, and document the value and the image versions it takes effect with. | ✅ Met | Chart tests cover rendering, omission, and invalid values. The configuration reference and upgrade notes describe the setting and specify that it takes effect with taskmaster and filer images newer than v0.10.6. |
Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: charts/tesk/templates/common/tesk-deployment.yaml:78, tests/test_chart.py:1101
# Conflicts: # docs/upgrading.md
Warn in the notes when tesk.filerHttpTimeout is set with taskmaster or filer images up to v0.10.6, check that unset values render no variable, and pin the tesk-core docs that describe the timeout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Adds the value
tesk.filerHttpTimeout: the timeout of the filer's HTTP(S) requests in seconds, for connecting and for each read (elixir-cloud-aai/tesk-core#101, PR elixir-cloud-aai/tesk-core#102).TESK_API_TASKMASTER_ENVIRONMENT_FILER_HTTP_TIMEOUT. tesk-api passes it to the taskmaster asFILER_HTTP_TIMEOUTwith no change needed, and the taskmaster passes it on to the filer.docs-sources.ymlpins the tesk-core docs at the merge of tesk-core PR 102 (8f827e0), which describe the timeout.Closes #259
Verification
Full-review lane (Helm chart).
tests/test_chart.py):REQUIRE_HELM=1 pytest testswith Helm 3.22.1: 363 passed, after merging dev (PR 258).ruff check,ruff format --check,mypy tests,helm lint charts/tesk: pass.mkdocs build --strict: passes.Declined review findings
"1e3") are rejected, though the filer reads them. Plain decimals are documented; numbers in values files may use any notation.filer_retries. Kept next tofilerRetries's pair, as invalues.yaml.Open questions
None. The default image tags follow in the release-prep PR after a tesk-core release.
🤖 Generated with Claude Code