Skip to content

feat(chart): add tesk.filerHttpTimeout - #260

Merged
uniqueg merged 4 commits into
devfrom
feat/filer-http-timeout
Nov 7, 2026
Merged

uniqueg merged 4 commits into
devfrom
feat/filer-http-timeout

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

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).

  • Default empty: nothing is rendered, and the filer's default (300 seconds) applies. When set, the value is rendered as TESK_API_TASKMASTER_ENVIRONMENT_FILER_HTTP_TIMEOUT. tesk-api passes it to the taskmaster as FILER_HTTP_TIMEOUT with no change needed, and the taskmaster passes it on to the filer.
  • Schema: positive numbers up to 1000000, the same range the filer accepts. Strings must be plain decimals; empty and null are allowed.
  • The notes warn when the value is set while the taskmaster or filer tag is a release up to v0.10.6, which ignores it.
  • docs-sources.yml pins the tesk-core docs at the merge of tesk-core PR 102 (8f827e0), which describe the timeout.
  • Docs: configuration reference (value, range, image versions) and upgrade notes ("Timeout of the filer's HTTP(S) requests").

Closes #259

Verification

Full-review lane (Helm chart).

  • Tests first (tests/test_chart.py):
    • rendered when set (numbers and strings), left out when empty or null;
    • schema failures for zero, negative, non-numeric and too large values;
    • a number from a values file, which Go renders in scientific notation, still parses as a number.
  • REQUIRE_HELM=1 pytest tests with 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.
  • CI: see the checks of the head commit.
  • Review: one round. Fixed: the upper bound (also in tesk-core PR 102), the values-file test and a template comment.

Declined review findings

  • Adversarial, low: string values in scientific notation (e.g. "1e3") are rejected, though the filer reads them. Plain decimals are documented; numbers in values files may use any notation.
  • Quality, low: the schema entry's position after the deprecated filer_retries. Kept next to filerRetries's pair, as in values.yaml.

Open questions

None. The default image tags follow in the release-prep PR after a tesk-core release.

🤖 Generated with Claude Code

uniqueg and others added 2 commits November 7, 2026 17:37
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]>
@sourcery-ai

sourcery-ai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Configuration

Define the timeout value and validate its supported range, then render it as the taskmaster environment variable only when configured.

  • charts/tesk/templates/common/tesk-deployment.yaml L76-80
  • charts/tesk/values.schema.json L160-170
  • charts/tesk/values.yaml L50-53

Warn users when the timeout is configured with taskmaster or filer images that do not support it.

  • charts/tesk/templates/_helpers.tpl L157-158, L172-177

Documentation

Document the new timeout's default, accepted values, image compatibility, and upgrade implications.

  • docs-sources.yml L13-14
  • docs/configuration.md L48
  • docs/upgrading.md L12-21

Tests

Test environment-variable rendering and omission, schema validation, values-file parsing, and warnings for unsupported image versions.

  • tests/test_chart.py L1131-1228

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (573ff5e) to head (2c3e632).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review November 7, 2026 16:49

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/configuration.md Resolved
Comment thread tests/test_chart.py Resolved

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread tests/test_chart.py Resolved
uniqueg and others added 2 commits November 7, 2026 17:55
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]>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery assessment

Approved.

@uniqueg
uniqueg merged commit 8a55c85 into dev Nov 7, 2026
25 of 28 checks passed
@uniqueg
uniqueg deleted the feat/filer-http-timeout branch November 7, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a chart value for the filer's HTTP timeout

1 participant